Skip to main content
Glama

prune-backup-files

Destructive

Lists backup files in a directory or previews which files a retention rule would remove, returning a prune plan without deleting anything.

Instructions

dbabrain common.cli prune-backup-files: Which backup files a directory holds, or which a retention rule would remove. Changes or removes something. A command on the emergency-operations list takes confirm: "yes" and a reason in its request, as on the command line. Request fields (pass them as request):

  • db_type (required): The engine the files belong to.

  • host: The host holding them.

  • target: SQL Server: the instance that lists its own backup folder - {host, port, username, password}.

  • path (required): The directory.

  • database_name: One database.

  • kinds: full | diff | log.

  • latest: Only the newest per database and kind.

  • after: Newer than this instant.

  • before: Older than this instant.

  • mode: prune: how obsolescence is judged.

  • cleanup_retention: prune: how long files are kept.

  • delete: prune: true is REFUSED since 0.38.0 - the command answers the plan and deletes nothing.

  • timeout_seconds: How long to wait.

  • wal_segments: PostgreSQL (0.35.0, 1.250): answer every segment name under wal/ on the log row - what a restore's WAL continuity is read from. Off by default: a cluster archives thousands.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "prune-backup-files"
  }
}

Input Schema

NameRequiredDescriptionDefault
requestNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description adds real context beyond the annotations, most importantly that `delete: true` is REFUSED since 0.38.0 and the command 'answers the plan and deletes nothing' — a material clarification for a tool flagged destructiveHint=true. It also discloses the confirm/reason gate for emergency-operations commands. It stops short of saying what permissions or scope a prune plan evaluates, but the safety-critical behavior is covered.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded and the field list is bulleted rather than prose, which aids scanning. However the 'dbabrain common.cli `prune-backup-files`:' prefix merely restates the name, and the wal_segments bullet is dense with version trivia ('0.35.0, 1.250') that competes with the operational content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool whose only schema parameter is an opaque request bag, the description supplies nearly everything an agent needs, and an output schema exists so return values need not be explained. The notable remaining gap is that `confirm` and `reason` are mandated in prose but absent from the request field list, so their placement is slightly ambiguous.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and the schema is a bare untyped `request` object, so the description carries the full burden — and it does, enumerating db_type, host, target, path, database_name, kinds, latest, after, before, mode, cleanup_retention, delete, timeout_seconds, and wal_segments with per-field meaning and version notes. Some entries are thin ('mode: prune: how obsolescence is judged') and the required confirm/reason fields are described in prose rather than in the field list, which keeps it short of a 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening line names a specific resource and dual capability: 'Which backup files a directory holds, or which a retention rule would remove.' That tells an agent this is both an inventory and a prune-plan tool, despite the name suggesting only pruning. It does not, however, explicitly distinguish itself from the sibling list-backup-files, so an agent must infer the split from the name alone.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Useful procedural guidance is present: commands on the emergency-operations list need `confirm`: "yes" and a `reason`. The `mode`, `latest`, `after`/`before`, and `kinds` fields also imply scoping choices. But there is no statement of when to use this over list-backup-files, and the mode values (prune vs. non-prune) are never enumerated, so an agent must infer the decision boundary.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools