Skip to main content
Glama

table_fragmentation

Read-only

Inspect MySQL tables by reclaimable data_free, worst first, to pinpoint where OPTIMIZE TABLE can recover fragmented space.

Instructions

[READ] data_free per table (space OPTIMIZE TABLE could reclaim), worst first.

Args: limit: Number of tables to inspect (default 50). target: Target name from config; omit for the default.

Returns an envelope: {"tables": [...], "returned": N, "limit": L, "truncated": bool}. When "truncated" is true there is more beyond what was returned — re-run with a higher limit rather than treating this as the complete picture.

Input Schema

NameRequiredDescriptionDefault
limitNo
targetNo

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 declare readOnlyHint=true, and the description's "[READ]" tag is consistent with that rather than contradicting it. Beyond the annotation it adds genuine behavior: the returned envelope shape and, importantly, the truncation contract — that "truncated: true" means re-run with a higher limit instead of trusting the output. That is meaningful operational context the annotations do not carry.

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 tag and the core metric before the Args/Returns blocks, and the truncation warning is attached to the value it qualifies. Slightly more prose than strictly needed around the envelope, but every sentence serves a purpose.

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?

With no output schema, the description correctly supplies the return envelope and truncation semantics, and both input params are documented. The one missing piece for a 2-param read tool with a confusing sibling (fragmentation_analysis) is any routing guidance between them.

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 carries the full burden and does so for both parameters: limit is "Number of tables to inspect (default 50)" and target is "Target name from config; omit for the default." This matches the schema defaults and explains intent, though "target" remains slightly under-defined (what a target represents is not spelled out).

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 description names the specific metric returned ("data_free per table"), the ordering ("worst first"), and the practical relevance ("space OPTIMIZE TABLE could reclaim"). That is more specific than a bare resource name, but it never distinguishes itself from the near-identical sibling fragmentation_analysis, so an agent still has to guess which of the two to pick.

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: mentioning that OPTIMIZE TABLE could reclaim the reported space hints that this is a pre-check before optimizing, but there is no explicit when-to-use statement or exclusion versus fragmentation_analysis or optimize_table. The agent must infer the workflow.

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