Skip to main content
Glama
sijunkim

DB Gateway MCP Server

by sijunkim

mysql_explain_query

Retrieve the execution plan for a SQL query on MySQL via EXPLAIN to diagnose performance issues and optimize query execution.

Instructions

Get the execution plan for a SQL query (EXPLAIN)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aliasNoMySQL connection alias (optional, uses default if omitted)
queryYesSQL query to analyze (SELECT, UPDATE, DELETE, etc.)
Behavior2/5

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

There are no annotations, so the description must disclose behavioral traits. It only says 'Get the execution plan' and doesn't state that the query is not actually executed, that the operation is read-only, or what kind of output to expect. This leaves important behavior unspecified.

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 a single, front-loaded sentence that captures the essence without any wasted words.

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?

The tool is simple and the description gives the core idea of returning an execution plan. However, since there is no output schema, the description doesn't specify the exact return format, but the standard EXPLAIN behavior is widely known. It is sufficient for a simple tool.

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?

Both parameters (alias and query) are fully documented in the schema with 100% coverage, so the baseline is 3. The description adds no additional semantic information about the parameters.

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 says 'Get the execution plan for a SQL query (EXPLAIN)' which clearly identifies the tool's function with a specific verb and resource. It distinguishes itself from siblings like mysql_execute_query (which actually runs the query) and mysql_describe_table (which describes table structure).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies this tool is for query performance analysis via EXPLAIN, but it doesn't explicitly state when to use it over alternatives or provide exclusions. For instance, it doesn't note that it won't execute the query, which would be helpful in choosing between this and mysql_execute_query.

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/sijunkim/db-gateway'

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