Skip to main content
Glama
MCP MySQL Server

MCP MySQL Server

query

Execute SQL statements against a MySQL database, optionally with prepared-statement parameters, to retrieve or modify data and inspect schema.

Instructions

Execute a SQL query on the MySQL database

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

Input Schema

NameRequiredDescriptionDefault
sqlYesSQL query to execute
paramsNoQuery parameters for prepared statements

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden. It doesn't say whether writes or DDL are allowed, whether multiple statements are permitted, how transactions are handled, or what occurs on error. For a tool that can execute arbitrary SQL, that omission is significant.

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 short sentence with no wasted words, and the core action is front-loaded. It is however terse to the point of under-specification given the tool's power.

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

Completeness2/5

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

With no annotations and no output schema, the description should explain return shape, affected-row behavior, and safety constraints, but says nothing. An agent cannot determine from this definition whether results are rows, a count, or how failures surface.

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 100%, so both 'sql' and 'params' are already documented. The description adds no syntax, formatting, or placeholder-binding details beyond the schema, which is the expected baseline.

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 SQL query on the MySQL database." An agent knows this runs SQL against MySQL, but the description does not distinguish it from the sibling insert/update/delete tools, so which tool is read-only remains ambiguous.

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?

No guidance is given about when to use this tool rather than insert, update, or delete. The description doesn't say whether this is meant for SELECT-style reads or for arbitrary SQL, leaving routing to the siblings up to inference.

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