Skip to main content
Glama
EgCooper

MCP MySQL

by EgCooper

execute_query

Run read-only SQL queries like SELECT, SHOW, DESCRIBE, EXPLAIN, and WITH against MySQL databases, returning rows up to a set limit for data inspection.

Instructions

Execute a read-only SQL query (SELECT, SHOW, DESCRIBE, EXPLAIN, WITH).

Args: query: SQL query to run. limit: Max rows when the query has no LIMIT (1-1000).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/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, and it does disclose the key behavioral trait: the operation is read-only and restricted to a whitelist of statement types. It still omits what happens when a write statement is submitted (rejected? error?), execution limits/timeouts, and whether the limit truncation is silent, which matters for a query-execution tool handling arbitrary input.

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 plus a compact Args block; the read-only constraint and statement whitelist are front-loaded before parameter detail. No filler.

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?

An output schema exists, so return values need not be described, and the safety profile and both parameters are covered. The remaining gap is sibling routing in a crowded tool set and the error behavior on disallowed statements.

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

Parameters4/5

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

Schema coverage is 0%, so the description must compensate, and it largely does: it documents both parameters and adds real semantics for limit ('Max rows when the query has no LIMIT', range 1-1000) that the schema does not express. The query parameter description ('SQL query to run') is thin, but the allowed-statement list in the opening sentence fills that gap.

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 resource (SQL query) and enumerates the permitted statement classes (SELECT, SHOW, DESCRIBE, EXPLAIN, WITH), which makes the scope unambiguous. It does not, however, differentiate itself from the specialized siblings like sample_rows or describe_table, so an agent must infer that this is the generic escape hatch.

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

Usage Guidelines2/5

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

There is no explicit when-to-use or when-not-to-use guidance and no mention of any alternative tool. Given a sibling set containing sample_rows, count_rows, describe_table and others, the description should route the agent (e.g., 'use this when no specialized tool fits') but does not.

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