Skip to main content
Glama
Yukuiii

any-db-mcp

by Yukuiii

explain

Retrieve the execution plan for a SQL query to analyze performance and optimize statements without running them. Supports SELECT, INSERT, UPDATE, DELETE, and WITH.

Instructions

获取 SQL 的执行计划,辅助分析查询性能与优化。所有权限模式下均可调用(EXPLAIN 不实际执行原 SQL)。仅支持 SELECT / INSERT / UPDATE / DELETE / WITH 开头的语句;无需自带 EXPLAIN 前缀,适配器内部统一拼接。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes要分析的 SQL(不需要自带 EXPLAIN 前缀)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.2

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose key traits: the SQL is not actually executed (a meaningful safety guarantee), it works under every permission mode, and the adapter auto-prefixes EXPLAIN. It stops short of describing the shape of the returned plan or any cost/latency behavior.

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?

Three tight sentences, purpose front-loaded, followed by constraints and the prefix-handling detail. Nothing is redundant and every clause carries usable information.

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 single-parameter tool with no output schema and no annotations, the description covers purpose, safety, permission scope, and input constraints. The one omission is any hint about the format of the returned execution plan, though without an output schema this is a minor gap.

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?

There is only one parameter and schema description coverage is 100%, so the schema already documents 'sql' fully. The description's note about not needing the EXPLAIN prefix simply repeats what the schema field description says, adding no meaning beyond structured data — the baseline of 3 is appropriate.

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?

States a specific verb and resource — obtaining the SQL execution plan for performance analysis — and scopes it precisely (SELECT/INSERT/UPDATE/DELETE/WITH only). The note that EXPLAIN does not execute the original SQL implicitly separates it from execution siblings like execute and query, so an agent can distinguish it without opening any schema.

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?

Gives clear context: callable in all permission modes, limited to five statement prefixes, and no manual EXPLAIN prefix required. It never explicitly names an alternative tool (e.g. 'use execute for actual execution'), so routing is left partly to inference, but the conditions for valid use are well defined.

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