Skip to main content
Glama
isdaniel

MySQL-Performance-Tuner-Mcp

get_table_stats

Read-onlyIdempotent

Analyze MySQL table statistics to identify optimization needs like index improvements, table fragmentation, and partitioning opportunities by examining size, row counts, and index information.

Instructions

Get detailed statistics for MySQL user tables.

Returns information about:

  • Table size (data, indexes, total)

  • Row counts and average row length

  • Index information

  • Auto-increment values

  • Table fragmentation

  • Engine type and collation

Helps identify tables that may need:

  • Optimization (OPTIMIZE TABLE)

  • Index improvements

  • Partitioning consideration

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
schema_nameNoSchema/database to analyze (uses current database if not specified)
table_nameNoSpecific table to analyze (analyzes all tables if not provided)
include_indexesNoInclude index statistics
order_byNoOrder results by this metricsize
Behavior4/5

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

Annotations already provide readOnlyHint=true, destructiveHint=false, and idempotentHint=true, covering safety aspects. The description adds valuable behavioral context beyond annotations: it specifies the exclusion of MySQL system tables, describes the types of statistics returned, and mentions practical use cases for the output. 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 with clear sections: purpose statement, detailed return information, use cases, and important note. Every sentence adds value without redundancy, and the information is front-loaded with the core purpose first.

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 comprehensive annotations (readOnlyHint, idempotentHint, etc.) and full parameter documentation in the schema, the description provides good contextual completeness. It explains what the tool returns and why it's useful. The main gap is the absence of an output schema, but the description partially compensates by listing the types of statistics returned.

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?

With 100% schema description coverage, the input schema already fully documents all 4 parameters. The description doesn't add any parameter-specific information beyond what's in the schema, so it meets the baseline expectation without providing extra value.

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 specific action ('Get detailed statistics') and resource ('MySQL user tables'), with explicit scope boundaries. It distinguishes from siblings by specifying it analyzes user tables only, unlike tools like get_fragmented_tables or get_index_stats which focus on specific aspects.

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 about when to use this tool ('Helps identify tables that may need optimization, index improvements, or partitioning consideration') and what it excludes (MySQL system tables). However, it doesn't explicitly mention when to choose alternative tools like get_fragmented_tables or get_index_stats for more specific analyses.

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