Skip to main content
Glama
Secure MySQL MCP Server

Secure MySQL MCP Server

by Kavi-200312

read_query

Execute read-only SELECT queries against a development MySQL database with AST-enforced single-statement validation and a 500-row cap for controlled data inspection.

Instructions

Execute a read-only SELECT query against the development database. AST-enforced, single statement only. Max 500 rows.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "sql": "<sql>"
    },
    "name": "read_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqlYesThe SELECT query to execute.
limitNoOptional row limit (max 500).
paramsNoOptional query parameters for parameterized queries.
databaseNoOptional database name.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full load and does so well: it discloses AST enforcement, a single-statement restriction, a 500-row cap, and the development-database target. It does not cover error behavior or what happens when the cap is hit, which keeps it off a 5.

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?

Three terse sentences, front-loaded with the core action and followed by the two constraints that most constrain how an agent writes the call. Nothing is wasted or repeated.

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

Completeness4/5

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

There is no output schema, so the description could say more about the shape of results, but for a SQL execution tool the important call-time facts (read-only, one statement, row cap, target database) are all present. What is missing is minor relative to the tool's simplicity.

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 coverage is 100%, so the schema already documents sql, limit, params, and database. The description only reinforces the 500-row ceiling that the limit parameter also mentions, adding little beyond the structured data.

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 and resource ("Execute a read-only SELECT query") plus scope ("against the development database"), which clearly separates it from write_query or explain_query without needing to name them. It stops short of an explicit sibling callout, so it lands just under the top mark.

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/SELECT framing implies when to use this rather than a write tool, but there is no explicit guidance such as when to prefer explain_query for inspection or what to do if a write is needed. Usage is inferable rather than stated.

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