Skip to main content
Glama

Execute non-production MySQL statement

mysql_execute
Destructive

Run one parameterized DML or DDL statement on a non-production MySQL connection, with production writes blocked and DDL or unfiltered updates/deletes requiring explicit opt-in.

Instructions

Execute one parameterized DML or DDL statement on a non-production connection. Never runs against a connection marked prod. Use mysql_execute_transaction for atomic multi-statement DML; run DDL separately because MySQL may implicitly commit it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesExactly one non-read SQL statement. Prod connections and explicit transaction/session-control statements are rejected.
allow_allNoExplicitly permit UPDATE or DELETE without WHERE.
allow_ddlNoExplicitly permit DDL, which may implicitly commit and cannot reliably be rolled back.
parametersNoPositional values for SQL ? placeholders. Values may be string, finite number, boolean, or null.
timeout_msNoClient-side query timeout in milliseconds, from 1000 through 120000.
connection_idYesConfigured connection ID, for example prod-main or test-main.
response_formatNoResponse rendering: markdown for humans or json for programmatic processing.markdown

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0-alpha.1

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare destructive/non-idempotent/openWorld, but the description adds context the annotations cannot convey: production connections are hard-rejected, only one statement may be submitted, and DDL may implicitly commit and not roll back. These are genuine operational constraints beyond the structured 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?

Three short sentences with zero filler, front-loaded with what the tool does, then the scoping constraint, then the sibling routing. Every clause carries information an agent needs.

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

Completeness4/5

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

For a destructive DDL/DML tool with rich annotations and full schema coverage, the description covers safety constraints, statement cardinality, and alternatives. It omits any indication of what a successful execution returns or how errors surface, which is a minor gap given no output schema exists.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds semantic linkage by stressing 'parameterized' (pointing at the positional parameters array) and the single-statement restriction on sql, and by implying why DDL needs separate handling (allow_ddl). It stops short of documenting allow_all, timeout_ms, or response_format.

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?

States a specific verb and resource (execute one parameterized DML or DDL statement) and scopes it to a non-production connection. It explicitly differentiates itself from mysql_execute_transaction in the same description, so an agent can distinguish the two without opening either schema.

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?

Gives explicit when-to-use routing: single statements here, multi-statement atomic DML via mysql_execute_transaction, and DDL run separately. It also states the negative condition (never against a prod connection). This is explicit when/when-not/alternative guidance.

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