Skip to main content
Glama
MySQL Automation MCP Server

MySQL Automation MCP Server

Execute Query

execute_query

Validate and run read-only SQL, safely apply a LIMIT, and return columns, result rows, and execution time.

Instructions

Validate query is read-only, safely inject LIMIT clause, execute, and return columns, result rows, and execution time.

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": "execute_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqlYes
limitNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations provided, the description carries the full behavioral burden and does well: it discloses the read-only guard, the automatic LIMIT injection, and the returned fields. Gaps remain around the SQL dialect/engine, transaction or isolation behavior, and error semantics for rejected statements.

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?

A single sentence with the safety check front-loaded before execution and output details. No filler, and the order of clauses mirrors the actual execution order.

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?

An output schema exists, so restating return fields is mild redundancy rather than a necessity. For a raw SQL execution tool with zero annotation coverage, the definition is adequate but thin: it omits dialect, error behavior for non-read-only input, and how the limit interacts with queries that already have one.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must explain both parameters and does not. The 'LIMIT' phrase hints that a limit parameter exists, but it never states that 'limit' defaults to 50, whether it overrides a caller-supplied LIMIT, or what form 'sql' takes (single statement, dialect, placeholders).

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?

States a specific verb and resource (execute a query) and enumerates the internal pipeline: read-only validation, LIMIT injection, execution, and returning columns, rows, and timing. The read-only framing is what separates it in spirit from the sibling execute_mutation without needing to name it.

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 validation step implies this tool is for SELECT-style queries only, which is useful selection guidance. However, it never states explicitly when to use this versus execute_mutation, explain_query, or export_query_results, and it does not say what happens if a write statement is passed.

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