Skip to main content
Glama
qq5032449

MySQL MCP Server

by qq5032449

execute_sql

Destructive

Execute SQL statements against MySQL for queries, inserts, updates, deletes, and schema inspection. Supports cross-database queries via fully qualified names and requires explicit confirmation for write operations.

Instructions

Execute a SQL statement against the MySQL server. Use for SELECT, DML (INSERT/UPDATE/DELETE), SHOW, DESCRIBE, and ad-hoc queries. Supports cross-database queries using database.table notation. Single statements only — use fully qualified names instead of USE statements. Write/delete statements require user confirmation: depending on the client, either a confirmation prompt appears, or the first call returns a confirm_token — show the SQL to the user, and after explicit consent re-call with the same query plus confirm_token. Use the optional alias parameter to target a different configured database within a single connection.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aliasNo数据库别名,或管理页面 /admin 中为该库配置的项目名称(项目文件夹名)。在单个 SSE 连接内通过此参数切换不同库;省略时用连接 URL ?alias 指定的别名或默认别名。建议优先传当前项目文件夹名自动匹配对应数据库。
queryYesThe SQL statement to execute. Single statements only.
confirm_tokenNoOne-time confirmation token returned by a previous write attempt. Pass it with the SAME query after the user explicitly approved the SQL.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.4.4

TDQS

A4.4/5.0
Behavior5/5

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

Annotations mark this as destructive, and the description substantially expands on this by detailing the confirmation workflow: a prompt appears, or a confirm_token is returned and must be re-sent with the same query after explicit user consent. It also discloses single-statement-only behavior and cross-database support, going well beyond the annotation flags.

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?

The description is dense but well-structured, front-loading the main purpose, then constraints, confirmation flow, and alias behavior. Every clause contributes essential information without redundancy, and its length is justified by the tool's complexity.

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

Completeness5/5

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

For a destructive SQL tool with no output schema, this description covers all critical operational aspects: statement types, single-statement enforcement, cross-db notation, the confirmation protocol, and alias usage. The only gap is return-format details, but that is standard SQL client behavior and not essential for correct invocation.

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?

The schema already covers all parameters, so the baseline is 3. The description adds meaningful semantics for confirm_token (one-time token from a prior write attempt, pass with the same query after approval) and alias (switch database within a single connection), enriching the raw schema definitions.

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?

The description clearly identifies the tool as executing SQL statements against a MySQL server and enumerates supported statement types (SELECT, DML, SHOW, DESCRIBE, ad-hoc queries). It is distinct from sibling inspection tools by its general-purpose scope, though it does not explicitly name or contrast them.

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

Usage Guidelines4/5

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

It provides direct usage guidance by enumerating applicable statement types and imposing constraints: single statements only, fully qualified names instead of USE statements, and confirmation for writes/deletes. It does not explicitly discuss when to prefer sibling tools like get_schema_info, but the implied distinction is clear.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/qq5032449/mysql_mcp_server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server