Skip to main content
Glama
xujcbiz

mysql-mcp-server

by xujcbiz

MySQL read-only query

mysql_query

Retrieve data and inspect schema safely with read-only MySQL queries, validated to allow only SELECT, SHOW, DESCRIBE, and EXPLAIN statements.

Instructions

Run a read-only MySQL query. Allowed statements: SELECT, WITH SELECT, SHOW, DESCRIBE/DESC, and safe EXPLAIN.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesRead-only SQL statement to execute.
maxRowsNoMaximum rows to return, up to 500.
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 discloses the critical behavioral constraint: only read-only statements are allowed, with explicit statement types. The term 'safe EXPLAIN' adds nuance beyond the schema. It does not cover failure modes or permissions, but the core safety behavior is clearly stated.

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?

Two sentences contain the essential information without padding. The first sentence states the action and constraint, and the second enumerates the allowed statements. Front-loaded and easy to scan.

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 simple two-parameter tool with no output schema, the description covers the core usage context: what query types are permitted and that it is read-only. It could mention the result shape, but for a generic query tool that is reasonably obvious; the schema handles parameter details.

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 is described as read-only SQL and maxRows has its limit and bounds documented. The description adds no additional parameter meaning beyond what the schema already provides, so it stays at the baseline.

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 uses a specific verb ('Run') and resource ('MySQL query'), clearly stating it executes read-only statements. The allowed statements list (SELECT, WITH SELECT, SHOW, DESCRIBE/DESC, safe EXPLAIN) differentiates it from sibling tools that list databases/tables or describe tables.

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 establishes clear context: this is the generic read-only query tool, while specialized siblings like mysql_list_databases, mysql_list_tables, and mysql_describe_table cover narrower cases. However, it does not explicitly name alternatives or provide exclusion rules like 'use mysql_describe_table when you only need a table schema'.

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/xujcbiz/mysql-mcp-server'

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