FastMCP Python MCP server wrapping the Backrest backup manager REST API
backrest-mcp has 13 well-named tools with consistent verb_noun patterns (get_*, list_*, trigger_*, do_*, cancel_*, forget_*, restore_*). All tools have descriptions (10 - 200 chars, within baseline 194 avg). Input schemas are present and typed for all tools. However, descriptions lack depth, most are 1 - 2 sentences without WHEN/WHY context, dependency hints, or recovery guidance. Parameter descriptions are minimal (e.g., 'Repository ID' vs 'The repository ID (as shown by list_snapshots / get_config)'). Output schemas are not documented, LLMs cannot infer response structure. Error handling is generic (_tool_error returns a dict with 'error' key but no recovery guidance). No tool annotations (readOnlyHint, destructiveHint) despite clear risk levels (READ_ONLY, WRITE, DESTRUCTIVE). Composition is sound, tools chain well (list_snapshots → list_snapshot_files → get_download_url). Security is strong: credentials injected via env, no secrets in params, audit logging present. Overall: solid foundation, but descriptions and output documentation need expansion to meet A-grade standards.
Cancel a running backup operation.
Execute a repository maintenance task (index, prune, check, stats, unlock, forget).
Permanently delete a snapshot from a repository.
Read the Backrest configuration (repos, plans, global settings). Returns the full Backrest config as a dict. Does not expose credentials.
Get a download URL for a file from a snapshot.
Check that Backrest is reachable and credentials are valid. Wraps GetConfig — the call that returns 200 with valid credentials and 401 when they drift. Returns status "ok", "auth_failed", or "unreachable", plus the configured URL and a repo/plan count when healthy. Read-only; safe to poll.
Output schemas not documented. LLMs cannot infer response structure for any tool. E.g., get_config returns 'full Backrest config as a dict' but no field list. get_operations returns 'recent backup operations' but no schema for operation objects.
Descriptions lack WHEN/WHY context and recovery guidance. E.g., get_summary is 'Get dashboard summary stats (repo and plan summaries)', no explanation of when to call it vs get_config or get_operations. No dependency hints like 'Call list_snapshots first to see available repos.'
No tool annotations despite clear risk levels. forget_snapshot (DESTRUCTIVE) and restore_snapshot (REVERSIBLE) lack destructiveHint/idempotentHint annotations. LLMs cannot distinguish safe from risky tools without explicit hints.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 62 | <=2025-11-25 | v2 |
Fetch operation logs by reference (from get_operations logref field).
List recent backup operations with status, timing, and log references.
Get dashboard summary stats (repo and plan summaries).
Browse files within a specific snapshot. Args: repo_id: The repository ID (as shown by list_snapshots / get_config). It is resolved to the repo GUID that the Backrest ListSnapshotFiles API expects. snapshot_id: Snapshot ID to browse. path: Directory path within the snapshot to list. Defaults to root "/". Returns a list of file/directory entries at the given path.
List snapshots in a Backrest repo, optionally filtered by repo or plan. Args: repo_id: Backrest repository ID to list snapshots for. When omitted, all configured repos are enumerated and their snapshots merged (each snapshot is tagged with its repoId). plan_id: Plan ID to filter snapshots. Can be combined with repo_id. Returns a list of snapshots with ID, timestamp, hostname, paths, tags, and repoId.
Restore files from a snapshot to a target path.
Trigger a backup plan immediately.
Error handling is generic. _tool_error returns {'error': 'tool call failed, check server logs for details'} with no recovery guidance. LLMs cannot self-correct or retry intelligently. No categorization of retryable vs fatal errors.
Parameter descriptions are minimal. E.g., repo_id in list_snapshots is 'Backrest repository ID to list snapshots for. When omitted, all configured repos are enumerated...' but lacks format/constraint info. plan_id in list_snapshots has no description of valid values or how it interacts with repo_id.