Skip to main content
Glama
Rufflet

mysql-legacy-mcp

mysql_legacy_update

Destructive

Executes a single UPDATE statement requiring a WHERE clause, returning affected and changed rows. Only active when MYSQL_LEGACY_ALLOW_UPDATE is enabled, preventing unsafe full-table writes.

Instructions

Runs exactly one UPDATE supplied in sql. WHERE is required and cannot be disabled. Off unless MYSQL_LEGACY_ALLOW_UPDATE=true. Returns affectedRows and changedRows. To empty a table use TRUNCATE via mysql_legacy_ddl, not a WHERE-less UPDATE.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesOne MySQL UPDATE statement with a WHERE clause.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already mark destructiveHint=true and readOnlyHint=false, and the description adds substantial context: WHERE is required and cannot be disabled, the tool is off unless MYSQL_LEGACY_ALLOW_UPDATE=true, exactly one statement is executed, and it returns affectedRows and changedRows. No contradiction with annotations.

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?

Five short sentences, every one load-bearing: the operation, the mandatory WHERE constraint, the environment flag, return fields, and the appropriate alternative for truncation. Information is front-loaded and there is no filler.

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?

Despite having no output schema, the description names the return fields (affectedRows and changedRows). It also covers safety guards, execution constraints, and the key misuse case. For a one-parameter SQL execution tool, this is complete enough for an agent to invoke it correctly.

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?

The input schema already fully describes the sql parameter as 'One MySQL UPDATE statement with a WHERE clause,' and schema coverage is 100%. The description restates the one-statement and WHERE requirements but adds no new parameter-level syntax or formatting guidance, so baseline 3 applies.

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?

The description states a specific verb and resource: 'Runs exactly one UPDATE supplied in sql.' It also distinguishes itself from siblings by explicitly saying table emptying should go through TRUNCATE via mysql_legacy_ddl, not this tool.

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

Usage Guidelines5/5

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

It clearly implies when to use it (whenever an UPDATE is needed) and explicitly gives a when-not/alternative: 'To empty a table use TRUNCATE via mysql_legacy_ddl, not a WHERE-less UPDATE.' This is direct decision guidance.

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