Skip to main content
Glama
isdaniel

MySQL-Performance-Tuner-Mcp

get_fragmented_tables

Read-onlyIdempotent

Identify MySQL tables with significant fragmentation that waste disk space and slow query performance. Analyze user tables based on fragmentation percentage and wasted space thresholds to optimize database storage.

Instructions

Find user tables with significant fragmentation.

Fragmentation occurs when:

  • Data is deleted from tables

  • Tables are frequently updated

  • VARCHAR/TEXT columns are modified

Note: This tool only analyzes user/custom tables and excludes MySQL system tables (mysql, information_schema, performance_schema, sys) by default.

High fragmentation wastes disk space and can slow queries.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
min_fragmentation_pctNoMinimum fragmentation percentage threshold
min_data_free_mbNoMinimum wasted space in MB
schema_nameNoFilter by specific schema
limitNoMaximum tables to return
Behavior4/5

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

Annotations already indicate read-only, non-destructive, and idempotent behavior. The description adds valuable context beyond this: it specifies that the tool excludes MySQL system tables by default and analyzes only user/custom tables, which is not covered by annotations. No contradiction with annotations exists.

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?

The description is well-structured and front-loaded with the core purpose in the first sentence. Each subsequent sentence adds necessary context (causes of fragmentation, scope exclusions, impact) without redundancy. It is appropriately sized and wastes no words.

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?

Given the tool's moderate complexity (analyzing fragmentation with filtering parameters), the description is mostly complete. It covers purpose, usage context, and behavioral details like table exclusions. However, without an output schema, it does not describe the return format (e.g., what data is included in results), leaving a minor gap.

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

Parameters3/5

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

The input schema has 100% description coverage, providing clear details for all four parameters (e.g., thresholds, filters, limits). The description does not add any parameter-specific information beyond what the schema already documents, so it meets the baseline score of 3 for high schema coverage.

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?

The description clearly states the tool's purpose: 'Find user tables with significant fragmentation.' It specifies the resource (user tables) and the action (find), and distinguishes itself from siblings by focusing on fragmentation analysis rather than other MySQL diagnostics like indexes, queries, or replication.

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?

The description provides clear context for when to use the tool by explaining what causes fragmentation (deletions, updates, VARCHAR/TEXT modifications) and the impact (wasted disk space, slow queries). However, it does not explicitly state when not to use it or name alternatives among the sibling tools, such as 'get_table_stats' for general table analysis.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/isdaniel/mysqltuner_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server