fix: get_thumbnail size limits, default=small, quality quirk docs (v0.3.5)
- Default size changed large → small (avoids MCP buffer overflows) - Hard limit: return Error: when thumbnail exceeds ~2 MB base64 (1.5 MB raw) - Soft limit: add "warning" field to JSON when thumbnail exceeds ~500 KB base64 (375 KB raw), advising to use size='small' - Constants _THUMB_ABORT_BYTES / _THUMB_WARN_BYTES moved to module level - 6 new tests for size cap/warning/default/DSM-error paths (113 total) - SPEC.md: document quality-ignored quirk, size ranges, soft+hard limits - CLAUDE.md: DSM Quirks entry for Thumb quality/size behaviour Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -186,6 +186,15 @@ See [SPEC.md](SPEC.md) for full tool specifications and DSM call details.
|
||||
maps error 400 to a clear "requires Btrfs-formatted volume" message.
|
||||
- **`SYNO.FileStation.BackgroundTask`:** Only the `list` method is available (v1–v3).
|
||||
No stop/cancel/clear methods exist on this firmware.
|
||||
- **`SYNO.FileStation.Thumb` — `quality` parameter ignored:** DSM accepts the `quality`
|
||||
field in the POST body but always returns the same JPEG regardless of the value.
|
||||
No server-side quality control is available.
|
||||
- **`SYNO.FileStation.Thumb` — size limits:** `small` thumbnails range from ~5 KB to
|
||||
~548 KB raw depending on source image resolution. `medium`/`large` can exceed 380 KB
|
||||
raw. `original` reflects the full stored image and may be several MB.
|
||||
The `get_thumbnail` tool enforces: abort >1.5 MB raw (≈2 MB base64), warning >375 KB
|
||||
raw (≈500 KB base64). Default changed from `large` to `small` to avoid MCP buffer
|
||||
overflows.
|
||||
|
||||
## Roadmap
|
||||
|
||||
|
||||
Reference in New Issue
Block a user