Skip to main content
Glama
HaokaiLau

mysql-readonly-mcp

by HaokaiLau

mysql_query

Run one validated read-only SELECT or CTE query against a configured MySQL database to inspect data safely without write operations.

Instructions

Execute one safe, read-only SELECT or read-only CTE against the configured database.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; it does disclose that execution is read-only and limited to a single statement ('one safe'), which is real behavioral value. It omits row limits, timeouts, permission requirements, and error behavior for rejected SQL.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no waste; the read-only restriction appears immediately after the verb. The adjective 'safe' adds little beyond 'read-only', a minor redundancy.

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?

There is no output schema and no annotations, so the description must cover everything. It establishes the read-only contract but leaves return shape (result rows), limits, and failure modes unspecified, which is a meaningful gap for an arbitrary-SQL tool.

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 0% for the single 'sql' parameter, so the description must compensate. It adds the useful constraint that the SQL must be a SELECT or read-only CTE, but says nothing about quoting, trailing semicolons, multi-statement rejection, or placeholders.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (execute) plus the resource and scope (SELECT / read-only CTE against the configured database). This cleanly separates it from the metadata siblings (list_tables, describe_table, list_indexes), though it never names them explicitly.

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 read-only constraint is stated, which implicitly tells an agent when this tool is valid, but there is no explicit when-to-use guidance and no routing to siblings such as mysql_explain for plan inspection. Usage must be inferred from the constraint alone.

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