Skip to main content
Glama

fragmentation_analysis

Read-only

Rank MySQL tables by reclaimable data_free to pinpoint OPTIMIZE TABLE candidates. Inject fragmentation rows for offline analysis or omit to pull live worst offenders.

Instructions

[READ] Rank tables by reclaimable data_free into OPTIMIZE TABLE candidates.

Pass 'tables' (as from table_fragmentation) for pure/offline analysis, or omit to pull the worst-fragmented tables live. Each recommendation cites its numbers.

Args: tables: Injected fragmentation rows; if omitted, pulled live. limit: How many tables to pull when not injected (default 50). target: Target name from config; omit for the default.

Input Schema

NameRequiredDescriptionDefault
limitNo
tablesNo
targetNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, so the safety profile is covered (the [READ] tag merely reinforces it). The description adds genuinely useful behavior: the injected-vs-live data path, and that each recommendation cites its numbers. This goes beyond what the annotations provide, though it omits any note on the shape of the returned ranking.

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 [READ] marker and the one-line purpose before the usage and Args sections. The Args block largely restates the inline prose, adding slight redundancy, but nothing is padded and the ordering is sensible.

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 read-only, no-output-schema tool this covers purpose, data paths, and all three parameters adequately, and hints at the output ('cites its numbers'). It is near-complete; the only minor gap is what the ranked output actually contains and how target selection is configured.

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 the burden, and it does: tables (injected rows, omitted means pulled live), limit (count pulled when not injected, default 50), and target (config target name, omit for default). Every parameter gets meaning beyond the bare schema types.

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 and resource ('Rank tables by reclaimable data_free') and the concrete goal ('into OPTIMIZE TABLE candidates'). It also distinguishes itself from the sibling table_fragmentation by positioning that tool as its data source, so an agent can tell the two apart.

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

Usage Guidelines4/5

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

Explicitly routes between two modes: pass 'tables' for pure/offline analysis, or omit to pull the worst-fragmented tables live. The relationship to table_fragmentation is named. It does not, however, state when to prefer this over calling table_fragmentation or optimize_table directly, so guidance stops short of full when/when-not coverage.

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