feat: add background_tasks + list_snapshots tools (v0.3.4)

- background_tasks: SYNO.FileStation.BackgroundTask::list (v3) — paginated
  table of active/recent copy/move/delete/extract/compress tasks
- list_snapshots: SYNO.FileStation.Snapshot::list (v2) — Btrfs snapshots
  per share; maps error 400 to a clear Btrfs-required message
- 20 new tests (107 total)
- SPEC.md and CLAUDE.md updated (26 tools)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-14 21:54:03 +02:00
parent b88677a20c
commit 4c6de3bfc7
6 changed files with 456 additions and 13 deletions
+17 -10
View File
@@ -146,7 +146,7 @@ src/mcp_synology_filestation/
└── filestation.py # register_filestation(mcp, config, client)
```
## Implemented Tools (v0.2.10 — 20 tools)
## Implemented Tools (v0.3.4 — 26 tools)
| Tool | Description |
|-----------------------|--------------------------------------------------------------|
@@ -170,17 +170,24 @@ src/mcp_synology_filestation/
| `create_sharing_link` | Create a public sharing link (optional password + expiry) |
| `list_sharing_links` | List all sharing links (paginated table) |
| `delete_sharing_link` | Delete a sharing link by ID |
| `get_thumbnail` | Fetch a thumbnail for an image/video file as base64 |
| `list_favorites` | List all FileStation user favorites |
| `add_favorite` | Pin a path as a FileStation favorite |
| `delete_favorite` | Remove a path from FileStation favorites |
| `background_tasks` | List FileStation background tasks (copy, move, delete, etc.) |
| `list_snapshots` | List Btrfs snapshots for a share (requires Btrfs volume) |
See [SPEC.md](SPEC.md) for full tool specifications and DSM call details.
## DSM Quirks (continued)
- **`SYNO.FileStation.Snapshot::list`:** Returns error 400 when the share is not on a
Btrfs-formatted volume. Confirmed: this NAS has no Btrfs volumes — `list_snapshots`
maps error 400 to a clear "requires Btrfs-formatted volume" message.
- **`SYNO.FileStation.BackgroundTask`:** Only the `list` method is available (v1v3).
No stop/cancel/clear methods exist on this firmware.
## Roadmap
### v0.3next
| Tool | API |
|--------------------|----------------------------------|
| `get_thumbnail` | `SYNO.FileStation.Thumb` |
| `list_favorites` | `SYNO.FileStation.Favorite` |
| `add_favorite` | `SYNO.FileStation.Favorite` |
| `delete_favorite` | `SYNO.FileStation.Favorite` |
| `list_snapshots` | `SYNO.FileStation.Snapshot` |
| `background_tasks` | `SYNO.FileStation.BackgroundTask`|
### v0.4candidates
No further tools currently planned.