Skip to main content
Glama

run_analyze

Destructive

Refresh PostgreSQL planner statistics for a table to improve query planning. Audited, no-undo write; supports dry-run preview and target selection.

Instructions

[WRITE][risk=medium] ANALYZE a table to refresh planner statistics.

No undo; captures prior stats for audit. Pass dry_run=True to preview.

Args:
    table: Table name (optionally schema-qualified).
    dry_run: If True, preview without running.
    target: Target name from config; omit for the default.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYes
targetNo
dry_runNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=true, idempotentHint=false, so the safety profile is covered. The description adds genuinely non-derivable context: 'No undo', prior stats 'captured for audit', a risk=medium label, and a preview path via dry_run. It stops short of describing permissions, locking impact on concurrent queries, or cost/duration.

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

Conciseness4/5

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

Front-loaded with the write/risk tag, then the effect, reversibility, and preview hint in three short sentences before the Args list. Efficient overall, with minor waste from restating the dry_run preview hint twice and from the Args block repeating names already in the schema, though at 0% coverage that block still earns its place.

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 3-parameter mutation tool with no output schema, the description covers what changes (planner statistics), reversibility and audit capture, preview mode, and all three parameters. It leaves unclear what the call returns (no output schema exists) and omits concurrency/locking implications, so it is strong but not exhaustive.

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 description coverage is 0%, so the description must carry the parameter burden, and it does: 'table' is documented as optionally schema-qualified, 'dry_run' as a no-execution preview, and 'target' as a config lookup where omission means the default. The only shortfall is that the dry_run explanation is duplicated between the body and the Args block rather than expanded.

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?

States a specific verb (ANALYZE) and resource (a table) plus the effect (refresh planner statistics), and fronts it with a [WRITE][risk=medium] tag that signals mutation scope. It does not name or contrast any sibling (run_vacuum, reindex), which is the only thing keeping it from a 5, though ANALYZE is naturally distinct from the maintenance siblings.

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?

Usage is implied by the purpose (maintenance op to refresh stats) and there is one actionable instruction, 'Pass dry_run=True to preview.' There is no explicit when-to-use/when-not guidance and no routing to alternatives such as run_vacuum, which is a clear gap for a write tool in a crowded maintenance sibling set.

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