mysql-aiops
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
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
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_sessionsA | [READ] Current sessions (processlist) with per-command counts. Flags sleeping sessions (connection-pool leak suspects). Args: include_sleeping: Include sessions in command=Sleep (default True). target: Target name from config; omit for the default. |
| long_running_queriesA | [READ] Active statements running at least Args: min_seconds: Minimum age in seconds (default 60). target: Target name from config; omit for the default. |
| list_transactionsA | [READ] Open InnoDB transactions, oldest first (stuck-transaction hunting). Args: target: Target name from config; omit for the default. |
| lock_waitsA | [READ] InnoDB wait-for edges (blocked session -> blocking session). Reads performance_schema.data_lock_waits on MySQL 8.x, or information_schema.innodb_lock_waits on MariaDB (flavor-branched). Args: target: Target name from config; omit for the default. |
| slow_query_rcaA | [READ] RCA for the worst statement digest, with cause + action. Picks the digest with the greatest total time and maps its numbers (no-index share, lock-time share, examined/sent ratio, tmp-disk spill, calls) — plus an optional EXPLAIN plan — to cited causes and concrete actions. Pass 'statements' for pure/offline analysis, or omit to pull the top digests live from performance_schema. Args: statements: Injected digest rows (as from top_queries); if omitted, the worst statements are pulled live. explain_sql: Optional SQL to EXPLAIN so plan access types feed the RCA. limit: How many statements to pull when not injected (default 20). target: Target name from config; omit for the default. |
| lock_wait_rcaA | [READ] Build the InnoDB wait-for tree, name the root blocker, and parse the last deadlock out of SHOW ENGINE INNODB STATUS. Pass 'pairs' (as from lock_waits) for pure/offline analysis, or omit to pull the current lock-wait graph live. Args: pairs: Injected lock-wait pairs {blockedId, blockingId, ...}; if omitted, pulled live (flavor-branched). include_deadlock: Also parse the LATEST DETECTED DEADLOCK section from SHOW ENGINE INNODB STATUS (default True). target: Target name from config; omit for the default. |
| replication_lag_rcaA | [READ] Map replica thread state / lag / error fields to cause + action. Pass 'status' (as from replica_status) for pure/offline analysis, or omit to pull the live replica status (flavor-branched). Args: status: Injected replica status record; if omitted, pulled live. target: Target name from config; omit for the default. |
| fragmentation_analysisA | [READ] Rank tables by reclaimable data_free into OPTIMIZE TABLE candidates. Pass 'tables' (as from table_fragmentation) for pure/offline analysis, or omit to pull the worst-fragmented tables live. Each recommendation cites its numbers. Args: tables: Injected fragmentation rows; if omitted, pulled live. limit: How many tables to pull when not injected (default 50). target: Target name from config; omit for the default. |
| unused_indexesA | [READ] Secondary indexes with zero I/O events since restart (drop candidates). From performance_schema.table_io_waits_summary_by_index_usage — counters reset on server restart, so confirm over a full business cycle. Args: target: Target name from config; omit for the default. |
| redundant_indexesA | [READ] Indexes whose columns are a leading prefix of another index (dupes). Args: target: Target name from config; omit for the default. |
| index_statsA | [READ] Per-index column lists and cardinality (selectivity screening). Args: target: Target name from config; omit for the default. |
| top_queriesA | [READ] Top statement digests from performance_schema by a whitelisted metric. Args: order_by: One of total_time, mean_time, calls, rows_examined, lock_time, no_index. limit: Number of statements to return (1..200, default 20). target: Target name from config; omit for the default. Returns an envelope: {"statements": [...], "returned": N, "limit": L, "truncated": bool}. When "truncated" is true there is more beyond what was returned — re-run with a higher limit rather than treating this as the complete picture. |
| explain_queryA | [READ] Return the JSON execution plan for The statement is planned, not executed. Args: sql: A single SQL statement to EXPLAIN. target: Target name from config; omit for the default. |
| reset_query_statsA | [WRITE][risk=medium] Reset statement-digest accumulators (irreversible). Truncates performance_schema.events_statements_summary_by_digest; the counters cannot be restored, so no undo is recorded. Pass dry_run=True to preview. Args: dry_run: If True, preview without resetting. target: Target name from config; omit for the default. |
| kill_sessionA | [WRITE][risk=high] Terminate a session (KILL CONNECTION). No safe inverse. Captures the session's user/host/query for the audit trail; a kill cannot be undone, so no undo is offered. Pass dry_run=True to preview. Refuses this tool's own session id — including under dry_run, which must report a refusal rather than preview a call that will be refused. Args: session_id: Session/connection id (from list_sessions). dry_run: If True, preview without killing. target: Target name from config; omit for the default. |
| kill_queryA | [WRITE][risk=high] Cancel a session's running statement (KILL QUERY). No inverse. The session stays connected; only its current statement is aborted. Captures the session's user/host/query for audit. Pass dry_run=True to preview. Refuses this tool's own session id — the statement it would cancel is this very call. Enforced under dry_run too. Args: session_id: Session/connection id (from list_sessions). dry_run: If True, preview without cancelling. target: Target name from config; omit for the default. |
| optimize_tableA | [WRITE][risk=medium] OPTIMIZE TABLE (rebuild, reclaim data_free). Records prior stats. No undo (a rebuild has no inverse); the prior size/fragmentation stats are captured for the audit trail. InnoDB maps this to ALTER TABLE ... FORCE (online DDL, brief locks) — schedule off-peak for hot tables. Pass dry_run=True to preview. Args: table: Table name (optionally schema-qualified, e.g. shop.orders). dry_run: If True, preview without running. target: Target name from config; omit for the default. |
| analyze_tableA | [WRITE][risk=medium] ANALYZE TABLE to refresh index statistics. No undo; captures prior stats for audit. Takes a brief read lock while sampling. Pass dry_run=True to preview. Args: table: Table name (optionally schema-qualified). dry_run: If True, preview without running. target: Target name from config; omit for the default. |
| create_indexA | [WRITE][risk=medium] Create an index. Reversible: undo drops the created index. The created (table, name) is returned so the harness records an undo that
drops exactly this index. Pass dry_run=True to preview. Alternatively pass
Args:
table: Table to index (optionally schema-qualified). Required unless
|
| drop_indexA | [WRITE][risk=high] Drop an index. Reversible: captures its definition first. Before dropping, the exact index definition is rebuilt from SHOW CREATE TABLE so the harness records an undo that recreates it. Pass dry_run=True to preview. Args: table: Table the index belongs to (optionally schema-qualified). name: Index name to drop. dry_run: If True, preview without dropping. target: Target name from config; omit for the default. |
| set_global_variableA | [WRITE][risk=medium] SET GLOBAL a server variable. Reversible: captures prior value. Runtime-only: the change does not survive a restart (persist it in my.cnf — or SET PERSIST on MySQL 8 — yourself); reported but NOT performed automatically. The prior value (from SHOW GLOBAL VARIABLES) is captured so the harness records an undo that sets it back. Pass dry_run=True to preview. Refuses the globals that would lock this tool out of the server (init_connect, max_connections, max_user_connections, read_only, super_read_only, skip_networking, require_secure_transport, and wait_timeout/interactive_timeout below 30s). SET GLOBAL is immediate, so those strand the undo. Enforced under dry_run too. Args: name: The global variable name (e.g. max_connections). value: The new value (as a string). dry_run: If True, preview without changing. target: Target name from config; omit for the default. |
| replica_statusA | [READ] Replica thread state and lag (SHOW REPLICA/SLAVE STATUS, flavor-branched). Empty on a primary/standalone server. MySQL 8.x uses SHOW REPLICA STATUS; MariaDB uses SHOW SLAVE STATUS — the result is normalised either way. Args: target: Target name from config; omit for the default. |
| binlog_statusA | [READ] Binary-log configuration, GTID mode, and connected downstream replicas. Args: target: Target name from config; omit for the default. |
| overviewA | [READ] One-shot server health snapshot. Version + flavor (mysql/mariadb) + uptime, connection headroom vs max_connections, sessions by command, the longest-running query, the most fragmented table, and the replica role — each section captured defensively so one failing probe does not sink the rest. Args: target: Target name from config; omit for the default. |
| server_versionA | [READ] Server version, flavor (mysql/mariadb), uptime and read-only state. Args: target: Target name from config; omit for the default. |
| show_variablesA | [READ] Global variables (SHOW GLOBAL VARIABLES). Args: pattern: Optional substring to filter variable names (e.g. 'innodb_buffer', 'max_connections'). target: Target name from config; omit for the default. |
| show_statusA | [READ] Global status counters (SHOW GLOBAL STATUS). Args: pattern: Optional substring to filter counter names (e.g. 'Threads', 'Innodb_buffer_pool'). target: Target name from config; omit for the default. |
| list_databasesA | [READ] User schemas with table count and data/index size (largest first). Args: target: Target name from config; omit for the default. |
| list_enginesA | [READ] Storage engines and which is the default (SHOW ENGINES). Args: target: Target name from config; omit for the default. |
| connection_statsA | [READ] Connection counters vs max_connections (exhaustion early warning). Args: target: Target name from config; omit for the default. |
| table_sizesA | [READ] Largest tables by data + index size. Args: limit: Number of tables to return, largest first (default 20). target: Target name from config; omit for the default. Returns an envelope: {"tables": [...], "returned": N, "limit": L, "truncated": bool}. When "truncated" is true there is more beyond what was returned — re-run with a higher limit rather than treating this as the complete picture. |
| table_fragmentationA | [READ] data_free per table (space OPTIMIZE TABLE could reclaim), worst first. Args: limit: Number of tables to inspect (default 50). target: Target name from config; omit for the default. Returns an envelope: {"tables": [...], "returned": N, "limit": L, "truncated": bool}. When "truncated" is true there is more beyond what was returned — re-run with a higher limit rather than treating this as the complete picture. |
| table_statusA | [READ] Per-table engine, row format, row estimate and last update time. Flags non-InnoDB tables (no row-level locking / crash recovery). Args: limit: Number of tables to inspect (default 50). target: Target name from config; omit for the default. Returns an envelope: {"tables": [...], "returned": N, "limit": L, "truncated": bool}. When "truncated" is true there is more beyond what was returned — re-run with a higher limit rather than treating this as the complete picture. |
| undo_listA | [READ] List recorded, not-yet-applied undo tokens (most recent first). Each entry names the original tool, the inverse tool that Returns {"undos": [...], "returned": N, "limit": L, "truncated": bool}.
Each entry carries Args: limit: Max rows to return (default 50, capped at 500). target: Unused (undo state is host-local); accepted for CLI uniformity. |
| undo_applyA | [WRITE][risk=medium] Apply a recorded undo by dispatching its inverse tool. The inverse runs through its own governed tool, so its own risk tier and audit row are recorded there. Pass dry_run=True to preview the inverse call without executing it. A token can only be applied once. Args:
undo_id: The undoId from undo_list (or an |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/AIops-tools/MySQL-AIops'
If you have feedback or need assistance with the MCP directory API, please join our Discord server