Skip to main content
Glama

destructive_query

Destructive

Run a destructive SQL statement only when necessary. It takes a database snapshot first and logs the reason.

Instructions

Run one destructive statement. A snapshot of the database file is written first (the newest few are kept next to the database), then the statement runs. Requires a short reason, which lands in the audit log. Never use this when write_query would do.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesOne DELETE, DROP TABLE/VIEW/INDEX, ALTER TABLE, CREATE/DROP TRIGGER or unfiltered UPDATE statement.
reasonYesWhy this is needed; recorded in the audit log.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, and idempotentHint=false, so the safety profile is covered. The description adds substantial context beyond them: a snapshot is written first, the newest few are retained next to the database, and a reason is required that lands in the audit log. That is exactly the operational behavior an agent needs before invoking a destructive tool.

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 tight sentences, front-loaded with the operation and its snapshot side effect, followed by the requirement and the routing rule. Every sentence earns its place.

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 two-param destructive tool with annotations covering the safety profile, everything an agent needs is present: what runs, the snapshot safeguard, the audit-log obligation, and the alternative tool. No output schema is a minor gap but not blocking.

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 both parameters are documented at the source and the baseline is 3. The description adds mild value over the schema by emphasizing the reason must be short and tying it to the audit log, but does not add syntax or format detail for the query parameter.

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+resource ('Run one destructive statement') and immediately distinguishes it from the sibling write_query. An agent can tell this apart from write_query 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?

Explicit when-not guidance with a named alternative: 'Never use this when write_query would do.' Nothing is left to inference about the selection condition.

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