Skip to main content
Glama
DB Health MCP
by ekss1121

table_bloat

Detect bloated tables by measuring PostgreSQL dead-tuple ratios or MySQL InnoDB fragmentation, helping prioritize storage and maintenance fixes.

Instructions

Find bloated tables (PostgreSQL: dead-tuple ratio; MySQL: InnoDB fragmentation via data_free).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "table_bloat"
  }
}

Input Schema

NameRequiredDescriptionDefault
database_urlNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

B3.1/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It does disclose the metrics it reads (dead tuples, data_free), which tells the agent this is a catalog inspection rather than a data read, but it says nothing about permissions, whether it is strictly read-only, or what happens when database_url is omitted.

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?

One sentence, front-loaded with the verb and resource, with the engine-specific definitions appended compactly. Nothing is redundant and nothing could be cut without losing meaning.

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

Completeness3/5

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

For a simple read-only diagnostic with one optional parameter and no output schema, the definition covers what is measured and for which engines. It is incomplete on connection resolution (the optional database_url) and on how results should be interpreted, which matters for a bloat-detection tool.

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

Parameters2/5

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

Schema coverage is 0% for the single database_url parameter, so the description should compensate. It never mentions the parameter at all – not what it should contain, nor that omitting it (default null) presumably targets a preconfigured database.

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?

"Find bloated tables" is a specific verb+resource, and the parenthetical defines what bloat means per engine (dead-tuple ratio on PostgreSQL, data_free fragmentation on MySQL). That operational definition separates it from siblings like index_usage or slow_queries, though it never explicitly names an alternative.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no prerequisites, and no pointer to alternatives such as health_report or db_overview. An agent must infer from the tool name alone whether to reach for this or a broader diagnostic tool.

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