Skip to main content
Glama
mysql2-mcp-server

mysql2-mcp-server

by jcxy

mysql_execute

Executes MySQL INSERT, UPDATE, or DELETE statements against a selected environment and returns the number of affected rows.

Instructions

执行 MySQL 更新/删除/插入语句,返回受影响行数。可用环境: default(默认: default)

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

Input Schema

NameRequiredDescriptionDefault
sqlYes要执行的 SQL 语句(UPDATE/DELETE/INSERT)
environmentNo目标环境名。可用环境: default(默认: default)。未传时使用默认环境

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.0

TDQS

B3.1/5.0
Behavior2/5

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

No annotations exist, so the description carries the full behavioral burden. It usefully states that affected row count is returned, but omits that these are destructive mutations, whether an implicit commit occurs, permission requirements, or safeguards for DELETE without WHERE — critical gaps given the presence of explicit transaction siblings.

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?

Two short sentences, with the operation and return value front-loaded. The second sentence is redundant with the input schema's environment description, which is the only wasted material.

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?

For a destructive write tool with no annotations and no output schema, the description should explain commit/rollback semantics, permission needs, and irreversibility. None of that is covered, and the transaction siblings make the omission more consequential.

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 the schema already documents both parameters, setting the baseline at 3. The description's environment sentence duplicates the schema text verbatim rather than adding resolution rules or examples, so it contributes nothing new.

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 uses a specific verb ('执行') and enumerates the exact statement classes handled (UPDATE/DELETE/INSERT), plus states the return value (affected row count). By limiting itself to DML, it implicitly separates itself from the read-oriented mysql_query sibling, though it never names that alternative.

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?

Usage is only implied through the statement-type list: an agent can infer SELECTs belong elsewhere. There is no explicit when-to-use/when-not guidance, and nothing addresses the mysql_begin/mysql_commit/mysql_rollback siblings, leaving transaction context entirely unaddressed.

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