Skip to main content
Glama
huanglixinccc

MySQL MCP Server

mysql_explain

Analyze MySQL query performance by running EXPLAIN on SELECT statements, returning the execution plan and full-scan warnings to identify optimization opportunities.

Instructions

Run EXPLAIN on a SELECT statement to analyze query performance. Returns execution plan and full-scan warnings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesSELECT statement to analyze
databaseNoTarget database (optional)
Behavior3/5

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

With no annotations provided, the description carries the full burden for behavioral disclosure. It reveals the return value (execution plan and full-scan warnings) but does not explicitly state that the query is not executed or that data is unchanged. This is a notable gap for an AI agent that might need to know the operation is non-destructive. The read-only nature is implied by 'EXPLAIN' but not explicitly confirmed.

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 two sentences long, front-loaded with the action and purpose, and then details the return value. Every word earns its place, with no unnecessary detail or repetition.

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 tool with two parameters and no output schema, the description is mostly complete: it states the action, scope, and return type. It misses the explicit note that the SELECT is not executed, which would be helpful for safety awareness, but otherwise covers the essential context well.

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?

The schema description coverage is 100%: the sql parameter is described as 'SELECT statement to analyze' and database as 'Target database (optional).' The tool description adds no further parameter semantics, so the baseline of 3 applies since the schema already documents both parameters effectively.

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 states 'Run EXPLAIN on a SELECT statement to analyze query performance,' which clearly identifies the specific verb (run EXPLAIN), resource (SELECT statement), and purpose (query performance). It distinguishes itself from siblings like mysql_query and mysql_execute by focusing on analysis rather than execution.

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 phrase 'analyze query performance' sets a clear context for when to use this tool: when you need to inspect the execution plan or check for full-scan warnings. It does not explicitly mention alternatives or exclusions, but the context is sufficient to infer it should be used over direct query execution for performance analysis.

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/huanglixinccc/mysql-mcp-nest'

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