Skip to main content
Glama
HaokaiLau

mysql-readonly-mcp

by HaokaiLau

mysql_explain

Return the JSON execution plan for a safe read-only SELECT query to inspect how MySQL uses indexes and joins. Use it to diagnose query performance without writes.

Instructions

Return the JSON execution plan for a safe read-only SELECT query.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose that only read-only SELECT input is accepted, implying safety and rejection of other statement types. It omits whether the query is ever executed, what happens on non-SELECT input, and required privileges.

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?

One sentence, no waste, with the return type and the input constraint front-loaded. Every clause earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The return value (JSON execution plan) is stated, which matters since no output schema exists, and the single parameter's constraint is given. Still missing is guidance on choosing this over mysql_query and any note on how the plan is produced (plain EXPLAIN vs execution).

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?

Schema coverage is 0% and the lone parameter 'sql' is undescribed in the schema, so the description must compensate. It adds that the value must be a read-only SELECT, which is useful, but says nothing about formatting, placeholders, or statement termination.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Return') and resource ('JSON execution plan'), plus the accepted input type ('safe read-only SELECT query'). It does not differentiate from siblings like mysql_query, which an agent might otherwise pick to run the same SQL.

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?

Usage is implied: reach for this when you want a plan rather than results. There is no explicit statement of when to prefer mysql_explain over mysql_query, nor any prerequisite or exclusion noted.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.