Skip to main content
Glama
RexySaragih

mysql-mcp

by RexySaragih

read_query

Read-onlyIdempotent

Execute read-only SELECT queries on MySQL/MariaDB databases. Mutating SQL is rejected; locking queries require confirmation.

Instructions

Execute a single read-only SELECT (or WITH … SELECT). Mutating SQL is rejected. Queries with FOR UPDATE / FOR SHARE / LOCK IN SHARE MODE / INTO @var require confirmed=true after a preview. Results are LIMIT-capped.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesSELECT or WITH … SELECT statement
max_rowsNoMax rows to return (default env MYSQL_MAX_ROWS / 100, hard max 500)
confirmedNoRequired true to run SELECT variants that take locks or set session variables. If omitted/false, returns a confirmation preview explaining impact.
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false. The description adds value by specifying that mutating SQL is rejected, that lock-requiring queries need confirmed=true, and that results are LIMIT-capped. No contradictions with 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?

Two sentences with no wasted words. Front-loaded with the core purpose and immediately followed by critical behavioral constraints.

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 rich annotations and full schema coverage, the description is complete. It covers the tool's read-only nature, constraints on SQL types, and the special 'confirmed' flow. No output schema is needed because the tool's return is a standard result set.

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%, so the input schema already provides detailed descriptions for all three parameters. The description adds minimal extra context about the 'confirmed' parameter (e.g., preview requirement) but mostly reinforces what is already in the schema.

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 'Execute a single read-only SELECT (or WITH … SELECT)', which provides a specific verb and resource. It distinguishes this tool from siblings like write_query by explicitly noting that mutating SQL is rejected.

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 gives explicit guidance: it says when to use (for read-only SELECT queries) and when not (mutating SQL rejected). It also describes the 'confirmed' parameter for queries with locking clauses, clarifying that a preview step is required.

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

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