Skip to main content
Glama

MySQL-Performance-Tuner-Mcp

analyze_statements

Analyze SQL statement performance from MySQL's performance schema to identify slow queries, execution patterns, and optimization opportunities for database tuning.

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

NameRequiredDescriptionDefault
schema_nameNoFilter by specific schema (optional)
order_byNoOrder by metrictotal_latency
limitNoMaximum number of statements to return
min_exec_countNoMinimum execution count filter

Input Schema (JSON Schema)

{ "properties": { "limit": { "default": 25, "description": "Maximum number of statements to return", "type": "integer" }, "min_exec_count": { "default": 1, "description": "Minimum execution count filter", "type": "integer" }, "order_by": { "default": "total_latency", "description": "Order by metric", "enum": [ "total_latency", "avg_latency", "exec_count", "rows_examined", "rows_sent" ], "type": "string" }, "schema_name": { "description": "Filter by specific schema (optional)", "type": "string" } }, "required": [], "type": "object" }

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/MySQL-Performance-Tuner-Mcp'

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