Skip to main content
Glama
gistrec

mcp-mysql-client

Выполнить читающий SQL-запрос

query
Read-onlyIdempotent

Execute a read-only SQL query (SELECT, SHOW, DESCRIBE) and get returned rows. Rejects write queries, supports safe parameter substitution, and truncates results with a truncated flag.

Instructions

Выполняет один читающий запрос (SELECT, SHOW, DESCRIBE, WITH ... SELECT) и возвращает строки. Изменяющие запросы отклоняются даже при включённых правах на запись — для них есть execute. Запрос идёт внутри read-only транзакции, число строк ограничено MYSQL_MAX_ROWS: если ответ обрезан, поле truncated равно true и это префикс, а не весь результат. Значения подставляйте через ? и params — драйвер экранирует их сам.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesОдин SQL-запрос. Несколько инструкций через ; не выполняются.
limitNoМаксимум строк в ответе. Потолок задан MYSQL_MAX_ROWS и не повышается этим полем.
paramsNoЗначения для подстановки вместо ? в порядке появления.
Behavior5/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, but the description goes beyond by explaining that modifying queries are rejected even with write permissions, queries run in a read-only transaction, rows are limited by MYSQL_MAX_ROWS, and truncated responses are marked with 'truncated: true' as a prefix not the full result. This adds behavioral details not available in annotations.

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 concise (3 sentences) and front-loaded with the primary purpose. Every sentence adds critical information: allowed query types, rejection of write queries, parameter handling, and truncation behavior. No fluff or redundancy.

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?

For a simple query-execution tool with full schema coverage, no output schema, and rich annotations, the description covers all essential aspects: what queries are allowed, how to pass parameters, limits, and truncation semantics. An agent has everything needed to call it correctly.

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

Parameters5/5

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

Schema description coverage is 100%, but the description adds valuable meaning beyond the schema: it explains how to use '?' placeholders with 'params', notes the limit is capped by MYSQL_MAX_ROWS, and clarifies that multiple statements separated by ';' are not executed. This is meaningful semantic guidance beyond the raw property descriptions.

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 clearly states the tool executes a read-only SQL query (SELECT, SHOW, DESCRIBE, WITH) and returns rows. It explicitly distinguishes from modifying queries and mentions the sibling 'execute' for those, so an agent can differentiate easily.

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

Usage Guidelines5/5

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

The description explicitly states when to use this tool (only for read-only queries) and when not to (modifying queries should use 'execute'). It also provides important usage guidance about parameter substitution and truncation behavior, which helps the agent choose the right tool and call it correctly.

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/gistrec/mcp-mysql-client'

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