Skip to main content
Glama

Execute non-production MySQL transaction

mysql_execute_transaction
Destructive

Execute 1–20 parameterized INSERT, REPLACE, UPDATE, or DELETE statements atomically on one non-production connection; rolls back on the first error. Rejects production, DDL, and reads.

Instructions

Atomically execute 1-20 parameterized INSERT, REPLACE, UPDATE, or DELETE statements on one non-production connection. Rolls back on the first error. Prod, DDL, reads, transaction control, and session control are rejected.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
allow_allNoExplicitly permit transaction UPDATE or DELETE statements without WHERE.
statementsYesOrdered INSERT, REPLACE, UPDATE, or DELETE statements committed atomically.
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.1/5.0
Behavior5/5

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

Annotations cover the safety profile (destructive, non-idempotent, non-read-only), but the description adds genuinely extra behavior: atomic execution with rollback on the first error, enforcement that the target is non-production, and the explicit rejection list. These are runtime semantics an agent cannot derive from the annotations or schema, so the description earns its keep.

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?

Two tightly written sentences, front-loaded with the core action and followed immediately by the failure semantics and the exclusion list. No filler, and the most decision-relevant facts (atomicity, non-prod, rejections) come first.

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 multi-statement mutation with no output schema, the description supplies the essentials: atomicity, rollback behavior, statement limits, and the environment/statement-type restrictions. It stops short of describing what a successful call returns (e.g. affected-row counts or per-statement results), which an agent might want, though response_format hints at rendering options.

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 coverage is 100%, so every parameter (connection_id, statements, timeout_ms, response_format, allow_all) is already documented in the schema, including the 1-20 bound and the ? placeholder convention. The description's mention of 'parameterized' and the statement count adds only marginal meaning over the schema, so the baseline 3 applies.

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?

States a specific verb (atomically execute) with the resource (parameterized INSERT/REPLACE/UPDATE/DELETE statements), a scope bound (1-20), and a hard constraint (one non-production connection). It implicitly separates itself from the read-oriented sibling mysql_query by naming 'reads ... rejected', but it never names an alternative tool the way a fully differentiated definition would.

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?

Gives clear when-not-to-use conditions: prod, DDL, reads, transaction control, and session control are all rejected, which lets an agent route those cases away without trial and error. It falls short of 5 because it never points to the correct alternative (e.g. mysql_query for reads, plain mysql_execute for single statements), leaving the agent to infer the routing.

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