MySQL-Performance-Tuner-Mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MYSQL_SSL | No | Enable SSL/TLS connection | false |
| MYSQL_URI | Yes | MySQL connection URI (required). Format: mysql://user:password@host:3306/database | |
| MYSQL_SSL_CA | No | Path to CA certificate file | |
| MYSQL_SSL_KEY | No | Path to client private key file | |
| MYSQL_SSL_CERT | No | Path to client certificate file | |
| MYSQL_POOL_SIZE | No | Connection pool size | 5 |
| MYSQL_SSL_VERIFY_CERT | No | Verify server certificate | true |
| MYSQL_SSL_VERIFY_IDENTITY | No | Verify server hostname matches certificate | false |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Server capabilities have not been inspected yet.
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_slow_queriesA | Retrieve slow queries from MySQL performance_schema. Returns the top N slowest queries with detailed statistics:
Requires performance_schema to be enabled (default in MySQL 5.6+). For older versions, use the slow query log instead. Note: This tool excludes queries against MySQL system schemas (mysql, information_schema, performance_schema, sys) to focus on user/application query performance. |
| analyze_queryA | Analyze a MySQL query's execution plan using EXPLAIN. Provides detailed analysis of:
Supports EXPLAIN FORMAT=JSON for MySQL 5.6+ for detailed cost analysis. Use EXPLAIN ANALYZE (MySQL 8.0.18+) for actual execution statistics. WARNING: With analyze=true, the query is actually executed! |
| get_table_statsA | Get detailed statistics for MySQL user tables. Returns information about:
Helps identify tables that may need:
Note: This tool only analyzes user/custom tables and excludes MySQL system tables (mysql, information_schema, performance_schema, sys). |
| get_index_recommendationsA | Get AI-powered index recommendations for MySQL user tables. Analyzes query patterns from performance_schema to recommend indexes:
Note: This tool only analyzes user/custom tables and excludes MySQL system tables (mysql, information_schema, performance_schema, sys). Based on MySQL performance_schema statistics and query patterns. Similar to MySQLTuner's index analysis but with more detailed recommendations. |
| find_unused_indexesA | Find unused and duplicate indexes in MySQL user tables. Identifies:
Removing unused indexes can:
Note: This tool only analyzes user/custom tables and excludes MySQL system tables (mysql, information_schema, performance_schema, sys). Based on information_schema and performance_schema statistics. |
| get_index_statsA | Get detailed index statistics for MySQL user tables. Returns:
Helps identify:
Note: This tool only analyzes user/custom tables and excludes MySQL system tables (mysql, information_schema, performance_schema, sys). |
| check_database_healthA | Perform a comprehensive MySQL database health check. Analyzes multiple aspects of MySQL health:
Returns a health score with detailed breakdown and recommendations. Based on MySQLTuner analysis concepts. |
| get_active_queriesA | Get currently active queries in MySQL. Shows:
Useful for:
|
| review_settingsA | Review MySQL configuration settings and get recommendations. Analyzes key performance-related settings:
Compares against best practices and system resources. |
| analyze_wait_eventsA | Analyze MySQL wait events to identify bottlenecks. Wait events indicate what processes are waiting for:
This helps identify:
|
| get_innodb_statusA | Analyze InnoDB engine status from SHOW ENGINE INNODB STATUS. Parses and analyzes:
Based on MySQLTuner's InnoDB analysis patterns. Provides actionable recommendations for InnoDB optimization. |
| analyze_buffer_poolA | Detailed analysis of InnoDB buffer pool usage. Analyzes:
Note: When analyzing by schema/table, this tool only shows user/custom tables and excludes MySQL system tables (mysql, information_schema, performance_schema, sys). Uses sys schema views for detailed breakdown when available. |
| analyze_innodb_transactionsA | Analyze InnoDB transactions and locking. Identifies:
Helps identify transaction-related performance issues. |
| analyze_statementsA | Analyze SQL statements from performance_schema/sys schema. Provides comprehensive analysis of:
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. |
| get_statements_with_temp_tablesA | Get statements that create temporary tables. Temporary tables can cause performance issues when:
Identifies queries that should be optimized. Note: This tool excludes queries against MySQL system schemas (mysql, information_schema, performance_schema, sys) to focus on user/application query analysis. |
| get_statements_with_sortingA | Get statements that perform sorting operations. Identifies queries with:
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. |
| get_statements_with_full_scansA | Get statements that perform full table scans. Full table scans can severely impact performance on large tables. Identifies queries that:
These queries are prime candidates for index optimization. Note: This tool excludes queries against MySQL system schemas (mysql, information_schema, performance_schema, sys) to focus on user/application query analysis. |
| get_statements_with_errorsA | Get statements that produce errors or warnings. Identifies queries with:
Helps identify problematic application queries. Note: This tool excludes queries against MySQL system schemas (mysql, information_schema, performance_schema, sys) to focus on user/application query analysis. |
| calculate_memory_usageA | Calculate MySQL memory usage and provide recommendations. Analyzes:
Based on MySQLTuner's memory calculation methodology. Helps identify memory-related configuration issues. |
| get_memory_by_hostA | Get memory usage breakdown by host or user. Uses sys schema or performance_schema to show:
Requires performance_schema memory instrumentation enabled. |
| get_table_memory_usageA | Analyze memory usage for user tables and caches. Shows:
Note: Buffer pool breakdown by table only shows user/custom tables and excludes MySQL system tables (mysql, information_schema, performance_schema, sys). Helps optimize table caching parameters. |
| analyze_storage_enginesA | Analyze storage engine usage and statistics for user tables. Provides:
Note: This tool only analyzes user/custom tables and excludes MySQL system tables (mysql, information_schema, performance_schema, sys) by default. Based on MySQLTuner's engine analysis patterns. |
| get_fragmented_tablesA | Find user tables with significant fragmentation. Fragmentation occurs when:
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. |
| analyze_auto_incrementA | Analyze auto-increment columns for potential overflow. Checks:
Note: This tool only analyzes user/custom tables and excludes MySQL system tables (mysql, information_schema, performance_schema, sys) by default. Based on MySQLTuner's auto-increment analysis. |
| get_replication_statusA | Get MySQL replication status and health. Analyzes:
Works with both MySQL and MariaDB terminology. |
| get_galera_statusA | Get Galera cluster status for MariaDB/Percona XtraDB Cluster. Analyzes:
Only applicable to Galera-enabled MySQL variants. |
| get_group_replication_statusA | Get MySQL Group Replication status. Analyzes:
Only applicable to MySQL with Group Replication enabled. |
| analyze_securityA | Perform comprehensive MySQL security analysis. Checks:
Based on MySQLTuner's security_recommendations() function. |
| analyze_user_privilegesA | Analyze privileges for a specific user or all users. Shows:
Helps identify excessive or missing privileges. |
| check_audit_logA | Check MySQL audit log configuration and status. Analyzes:
Supports MySQL Enterprise Audit, MariaDB Audit Plugin, and Percona Audit Log Plugin. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| optimize_slow_query | Analyze and optimize a slow SQL query |
| health_check | Perform a comprehensive MySQL health check |
| index_review | Review indexes for a database schema |
| performance_audit | Full performance audit of MySQL server |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| MySQL Best Practices | Best practices for MySQL performance tuning |
| Index Guidelines | Guidelines for MySQL index optimization |
| Configuration Guide | MySQL configuration optimization guide |
TDQS
Scored across 30 tools
Most tools have distinct purposes with clear boundaries, such as analyze_auto_increment for overflow checks versus analyze_buffer_pool for memory usage. However, some overlap exists, like analyze_statements and get_slow_queries both analyzing query performance, which could cause minor confusion. Overall, descriptions help differentiate tools effectively.
Tool names follow a highly consistent verb_noun pattern throughout, using snake_case uniformly. All tools start with verbs like analyze_, get_, find_, check_, or calculate_, followed by descriptive nouns, making the set predictable and readable. No deviations in naming conventions are present.
With 30 tools, the count feels heavy for a performance tuning server, bordering on excessive. While the domain is broad, many tools could be consolidated (e.g., multiple analyze_* tools for specific aspects). This may overwhelm users or agents, though it covers many niche areas.
The tool set provides comprehensive coverage for MySQL performance tuning, including analysis, monitoring, and optimization across areas like queries, indexes, memory, transactions, and security. No obvious gaps exist; tools support full lifecycle management from diagnosis to recommendations, ensuring agents can handle most tuning tasks.