Skip to main content
Glama
huanglixinccc

MySQL MCP Server

mysql_query

Run SELECT statements on MySQL using ? placeholders and an optional limit. Returns the data rows, field names, and row count for read-only database queries.

Instructions

Execute a SELECT query against MySQL. Returns rows, field names, and row count. Results are automatically limited.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesSELECT statement. Use ? as placeholders.
limitNoMax rows to return (default 100, max 1000)
paramsNoValues for ? placeholders
databaseNoTarget database (optional)
Behavior3/5

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

With no annotations provided, the description must convey safety and operational behavior. It states the operation is a SELECT query (non-destructive) and that results are automatically limited, which are useful behavioral traits. However, it doesn't explicitly state it is read-only, doesn't mention the default/max limit values (though schema does), and doesn't discuss any potential error conditions or permission requirements. The description adds some transparency but is not comprehensive.

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 three sentences, each providing essential information: the operation, the return payload, and the auto-limit behavior. No superfluous language; it is easy to scan and immediately communicates the tool's core purpose and caveat.

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 4-parameter tool with full schema descriptions and no output schema, the description gives a clear summary of return values (rows, field names, row count) and the auto-limit behavior, which is the key operational constraint. However, it lacks any mention of the relationship to sibling tools (e.g., mysql_execute for writes), which would complete the context. Overall, it covers the most important aspects 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?

Schema coverage is 100%, so every parameter (sql, limit, params, database) has a description. The description adds no additional parameter semantics, so baseline 3 is appropriate. It does mention that results are returned, but not specific to parameters.

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?

The description clearly states the tool executes a SELECT query and returns structured results (rows, field names, row count). It uses the specific verb 'Execute' and resource 'SELECT query against MySQL', but does not explicitly differentiate from sibling tools like mysql_execute, though 'SELECT' narrows the scope.

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

Usage Guidelines2/5

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

The description does not provide any guidance on when to use this tool versus alternatives. It implies it is for SELECT queries but never mentions that mysql_execute handles write operations or other non-SELECT statements. There are no explicit exclusions or comparable use cases.

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