Skip to main content
Glama

analyze_table

Destructive

Refresh MySQL/MariaDB index statistics to support query optimization. Preview safely with dry_run and capture prior stats for audit.

Instructions

[WRITE][risk=medium] ANALYZE TABLE to refresh index statistics.

No undo; captures prior stats for audit. Takes a brief read lock while sampling. 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

NameRequiredDescriptionDefault
tableYes
targetNo
dry_runNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly=false, destructive=true, idempotent=false, and the description adds genuinely new context beyond them: no undo is possible, prior stats are captured for audit, and a brief read lock is held during sampling. That is meaningful operational disclosure, though it stops short of explaining expected duration or return format.

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 operation and risk tag, followed by three tight behavioral sentences and a compact Args block. Nearly every sentence earns its place; the bracketed tags are slightly redundant with the annotations but cheap.

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 mutating tool with no output schema, the description covers the essentials: irreversibility, lock behavior, audit capture, and a safe preview path. It could say more about cost or expected effect on query planning, but an agent has enough to call it correctly.

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 load and it does: all three parameters are documented with real meaning (table optionally schema-qualified, dry_run previews, target names a config target and defaults when omitted). The only gap is that 'target from config' is not further elaborated.

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 and resource ('ANALYZE TABLE to refresh index statistics') plus a risk/write tag, so the agent knows exactly what operation this is. It does not, however, differentiate itself from the sibling optimize_table, which an agent might confuse with a statistics-refresh operation.

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 only implied: the description notes that dry_run=True previews the operation, which tells the agent a safe path exists but not when this tool is preferred over optimize_table or index_stats. No when-not-to-use or alternative routing is given.

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