Skip to main content
Glama
isdaniel

MySQL-Performance-Tuner-Mcp

get_statements_with_sorting

Read-onlyIdempotent

Identify MySQL queries performing sorting operations to detect file sorts, memory sorts, and sort merge passes for performance optimization and index tuning.

Instructions

Get statements that perform sorting operations.

Identifies queries with:

  • File sorts (on disk)

  • Memory sorts

  • Sort merge passes

High file sort ratios indicate need for index optimization or sort_buffer_size increase.

Note: This tool excludes queries against MySQL system schemas (mysql, information_schema, performance_schema, sys) to focus on user/application query analysis.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum statements to return
file_sorts_onlyNoOnly show statements with file sorts
Behavior4/5

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

The description adds valuable behavioral context beyond annotations. While annotations indicate read-only, non-destructive, and idempotent operations, the description adds that it 'excludes queries against MySQL system schemas' and provides diagnostic guidance about what high file sort ratios indicate. This gives practical usage context that annotations alone don't provide.

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?

The description is well-structured and appropriately sized. It starts with the core purpose, then details what it identifies, provides diagnostic guidance, and ends with an important exclusion note. Each sentence adds value, though the diagnostic guidance about file sort ratios could be considered slightly beyond the minimal required description.

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 analysis tool with good annotations and full parameter documentation, the description provides good contextual completeness. It explains what the tool returns (statements with sorting operations), what types it identifies, diagnostic implications, and important exclusions. The main gap is the lack of output schema, but the description compensates reasonably well for this.

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 both parameters (limit and file_sorts_only). The description doesn't add any parameter-specific information beyond what's in the schema, so it meets the baseline of 3 where the schema does the heavy lifting for parameter documentation.

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: 'Get statements that perform sorting operations' with specific details about what types of sorting it identifies (file sorts, memory sorts, sort merge passes). It distinguishes from sibling tools by focusing specifically on sorting operations rather than other query analysis aspects like errors, full scans, or temp tables.

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: for analyzing user/application queries with sorting operations, excluding MySQL system schemas. It mentions that 'High file sort ratios indicate need for index optimization or sort_buffer_size increase' which gives diagnostic context. However, it doesn't explicitly state when NOT to use it or name specific alternative tools among the siblings.

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