Skip to main content
Glama
shibbirweb

mcp-mysql-read-only

by shibbirweb

run_query

Read-onlyIdempotent

Executes read-only SQL queries like SELECT, WITH, SHOW, DESCRIBE, EXPLAIN against MySQL databases, with optional per-call database override without altering active connection.

Instructions

Execute a read-only SQL query (SELECT, WITH, SHOW, DESCRIBE, EXPLAIN only) against the active connection

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSQL query to execute
databaseNoOptional database to read from for this call only, without changing the active connection

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.5

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already provide read-only, idempotent, and non-destructive hints. The description adds concrete behavioral details: the exact set of allowed SQL commands and the reliance on the active connection. This goes beyond annotations and helps the agent understand limitations and context.

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 a single, well-structured sentence that front-loads the core purpose and restrictions. Every word earns its place, with no redundant information or filler.

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

Completeness3/5

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

For a generic query tool, the description covers the operation and constraints but does not hint at return format, error behavior, or result sizing. Given the active connection context and read-only guarantee, it is adequate but lacks richness that could help an agent predict the tool's output.

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?

The schema covers both parameters with descriptions ('SQL query to execute' and 'Optional database... without changing the active connection'), achieving 100% coverage. The tool description does not elaborate further on parameters, so it adds no semantic value beyond the schema, warranting the baseline score of 3.

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 SQL queries, restricts to read-only commands (SELECT, WITH, SHOW, DESCRIBE, EXPLAIN), and specifies it operates against the active connection. This distinguishes it from sibling tools that list tables or metadata, making its purpose unambiguous.

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

Usage Guidelines3/5

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

The description implies usage for ad-hoc read-only SQL queries but does not explicitly compare to alternatives like describe_table or list_tables, nor state when to prefer them. It provides a constraint (read-only only) but no explicit when-to-use/when-not-to-use guidance relative to siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.