Skip to main content
Glama
isdaniel

MySQL-Performance-Tuner-Mcp

analyze_statements

Read-onlyIdempotent

Analyze SQL statement performance metrics including execution times, row efficiency, and error rates to identify optimization opportunities in MySQL databases.

Instructions

Analyze SQL statements from performance_schema/sys schema.

Provides comprehensive analysis of:

  • Statement digest summaries

  • Total and average execution times

  • Rows examined vs rows sent ratios

  • Statement error rates

  • Most expensive queries

Based on MySQLTuner's performance schema analysis. Requires performance_schema enabled.

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
schema_nameNoFilter by specific schema (optional)
order_byNoOrder by metrictotal_latency
limitNoMaximum number of statements to return
min_exec_countNoMinimum execution count filter
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, idempotentHint=true, and openWorldHint=false. The description adds valuable context beyond annotations: requires performance_schema enabled, excludes system schema queries, and is based on MySQLTuner's analysis. 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 appropriately sized: it starts with the core purpose, lists analysis areas in bullet points, provides implementation context (MySQLTuner-based), states prerequisites, and adds an important exclusion note. Every sentence adds value with zero waste.

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 complexity (analyzing SQL statements with multiple metrics), the description is quite complete: it explains what's analyzed, prerequisites, exclusions, and context. However, without an output schema, it doesn't describe the return format (e.g., structure of analysis 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?

Schema description coverage is 100%, so the schema already fully documents all 4 parameters. The description doesn't add parameter-specific details beyond what the schema provides, maintaining 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 analyzes SQL statements from performance_schema/sys schema, listing specific analysis areas (statement digest summaries, execution times, row ratios, error rates, expensive queries). It distinguishes from siblings like 'get_slow_queries' or 'get_statements_with_errors' by providing comprehensive analysis rather than focused subsets.

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: requires performance_schema enabled, excludes queries against MySQL system schemas to focus on user/application queries. However, it doesn't explicitly state when to use this vs. alternatives like 'get_slow_queries' or 'analyze_query', though the comprehensive nature is implied.

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