Skip to main content
Glama

select

Execute read-only SQL queries against a MySQL database and return matching rows. Pass values through parameters with %s placeholders to avoid SQL injection.

Instructions

Execute a read-only SELECT (or WITH ... SELECT) statement and return matching rows. Always available regardless of MYSQL_MODE. Always use %s placeholders in query with values passed via params; never concatenate user-supplied values into query.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
paramsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses the read-only safety profile, availability, and the critical placeholder requirement. It does not mention error behavior, transaction details, or return format, but the output schema covers return values. It adds meaningful context beyond what annotations would provide.

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 concise sentences, each adding value: purpose, availability, and security guideline. It is front-loaded with the core purpose and contains no redundant or filler content.

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

Completeness5/5

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

Given the simple tool (2 parameters, no nested objects, output schema present), the description covers purpose, read-only nature, availability, and placeholder usage. It is complete for a SELECT tool and the output schema handles return value documentation. No significant gaps remain.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It explains that `query` is a SQL statement with %s placeholders and that `params` holds the substitution values, clarifying the relationship between the two parameters. It does not enumerate all parameter types, but the schema is simple and the guidance is sufficient.

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 explicitly states 'Execute a read-only SELECT (or WITH ... SELECT) statement and return matching rows,' which is a specific verb+resource+scope. It clearly distinguishes from the sibling tools insert, update, and delete by emphasizing the read-only nature.

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?

The description provides clear usage context: always available regardless of MYSQL_MODE, and the requirement to use %s placeholders with params rather than concatenating values. It implies this is for read queries while siblings are for writes, but does not explicitly name alternatives or exclusion scenarios.

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

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