Skip to main content
Glama

run_vacuum

Destructive

Reclaim table storage and refresh planner statistics with VACUUM, FULL, or ANALYZE; preview changes via dry_run and record prior stats for audit.

Instructions

[WRITE][risk=medium] VACUUM a table (optionally FULL/ANALYZE). Records prior stats.

No undo (a vacuum has no inverse); the prior dead-tuple/last-vacuum stats are
captured for the audit trail. VACUUM FULL takes an exclusive lock. Pass
dry_run=True to preview.

Args:
    table: Table name (optionally schema-qualified, e.g. public.orders).
    full: Run VACUUM FULL (rewrites the table, exclusive lock).
    analyze: Also refresh planner statistics (VACUUM ANALYZE).
    dry_run: If True, preview without running.
    target: Target name from config; omit for the default.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fullNo
tableYes
targetNo
analyzeNo
dry_runNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare destructive=true/non-idempotent; the description goes well beyond by disclosing that vacuums have no inverse, that prior dead-tuple/last-vacuum stats are captured for audit, and that VACUUM FULL takes an exclusive lock. It even offers a dry_run escape hatch. This is exactly the kind of behavioral context that matters for a destructive operation.

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

Conciseness5/5

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

Risk/verb front-loaded in the first line, behavioral caveats next, then a tight Args list. No wasted sentences; every line earns its place.

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

Completeness5/5

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

For a destructive, no-output-schema tool, the definition covers what changes, irreversibility, locking impact, preview mechanism, and all parameters. An agent has everything needed to invoke it safely.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must carry all five parameters, and it does: table (with schema-qualification example), full (rewrite + exclusive lock), analyze (VACUUM ANALYZE), dry_run (preview), and target (config target, omit for default). Each adds meaning the bare schema lacks.

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

Purpose5/5

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

States a specific verb (VACUUM) and resource (a table), with modifiers FULL/ANALYZE called out. The [WRITE][risk=medium] tag immediately separates it from read-only siblings like bloat_and_vacuum_analysis or list_locks, so an agent can route correctly without opening the schema.

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?

Implies context through parameter docs (dry_run preview, target selection) and notes risk, but never says when to prefer this over run_analyze or bloat_and_vacuum_analysis, nor when not to vacuum. Usage is inferable but no explicit alternatives or exclusions are given.

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