Skip to main content
Glama
Rufflet

mysql-legacy-mcp

mysql_legacy_delete

Destructive

Delete rows from legacy MySQL with a mandatory WHERE clause, returning affected rows. Requires explicit enablement via MYSQL_LEGACY_ALLOW_DELETE to prevent accidental full-table deletions.

Instructions

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

Input Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.0

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the annotations, the description discloses the safety requirement that WHERE cannot be disabled, the feature-flag/authorization condition, and the return value (affectedRows). These details add meaningful behavioral context beyond readOnly/destructive hints.

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 compact and front-loaded, with each sentence earning its place: the core action, safety constraint, feature flag, return value, and truncate alternative. No filler or redundancy.

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 single-parameter destructive tool with no output schema, the description is complete: it covers behavior, safety, availability, return value, and the relevant alternative. An agent has enough context to invoke it correctly.

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 the sql parameter well, so the baseline is 3. The description adds extra semantics by noting the statement must be a single DELETE and that the WHERE clause cannot be disabled, reinforcing safety and usage nuances not fully explicit in the schema.

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 clearly states the tool's specific action: 'Runs exactly one DELETE supplied in sql.' It also adds clarifying constraints like 'WHERE is required and cannot be disabled' and differentiates from mysql_legacy_ddl for TRUNCATE, which distinguishes it from sibling tools.

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 explicitly explains when the tool is available ('Off unless MYSQL_LEGACY_ALLOW_DELETE=true'), imposes a mandatory WHERE clause, and directs users to mysql_legacy_ddl for TRUNCATE instead of a WHERE-less DELETE. This gives clear when-to-use and when-not-to-use guidance.

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