Skip to main content
Glama
lm203688

MySQL MCP Server

Query

query

Run read-only SQL queries (SELECT, SHOW, DESCRIBE, EXPLAIN) on MySQL or MariaDB databases to retrieve data without altering records.

Instructions

执行SQL查询(只读,仅支持SELECT/SHOW/DESCRIBE/EXPLAIN)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesSQL查询语句
databaseNo可选,指定数据库。如未指定则使用默认数据库

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

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 behavioral burden. It clearly discloses the read-only safety property and the allowed SQL statement set, which is the most important behavioral context. It does not detail result limits or error handling, but the output schema covers return-value expectations.

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 sentence that names the action, the read-only constraint, and the supported SQL statements. Every element carries signal and there is no repetition of the tool name or schema.

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 read-only SQL query tool with a complete input schema and an output schema, the description plus schema is sufficient to call the tool correctly. A small gap is that it does not clarify when to prefer specialized siblings like describe_table or explain_query, but this does not block correct invocation.

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 description coverage is 100%: sql and database already have meaningful descriptions. The tool description adds no parameter-level detail, so 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?

The description states a clear verb and resource: execute SQL queries, and further restricts the scope to read-only statements (SELECT/SHOW/DESCRIBE/EXPLAIN). This also separates it from sibling execute_write, whose purpose is write operations.

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?

It explicitly states when the tool is appropriate: any read-only SQL query among the listed statement types, and explicitly excludes write statements via '只读' and '仅支持'. However, it does not name the alternative tool (execute_write) for unsupported write operations, though that is inferable from the sibling list.

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