Skip to main content
Glama
ianderso
by ianderso

undo_transaction

Destructive

Safely revert a past transaction: first checks for conflicts, then undoes if clean, with dry-run preview and forced override to discard later edits.

Instructions

Undo a past transaction, after checking whether it can be undone cleanly.

A conflict means an object was edited again after this transaction; undoing anyway throws that later edit away. The conflict check is free and runs first, so the default tells you what you are dealing with before anything changes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forceNoUndo even when there are conflicts. This DISCARDS edits made to those objects after the transaction. Use deliberately.
dry_runNoTrue (default) only checks whether the undo is clean. Set False to actually undo.
transaction_idYesFrom list_transactions.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=false, but the description adds genuinely new behavioral facts: a conflict check runs first, it is free, and it precedes any mutation, while forcing past a conflict destroys later edits. That is exactly the causal detail 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, front-loaded with the action and the precondition, with no filler. The line breaks are slightly awkward but nothing is wasted or repeated.

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?

With no output schema, the description should carry the return semantics; it only gestures at them ('tells you what you are dealing with') rather than describing the conflict-check result. Everything else needed to call this destructive three-parameter tool safely is present.

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 description coverage is 100%, so force, dry_run, and transaction_id are all documented in the schema itself, including the DISCARDS warning. The description reinforces the conflict model behind force but never names a parameter or adds syntax beyond the schema, so the baseline 3 is appropriate.

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 ('Undo a past transaction') plus the exact precondition it evaluates ('after checking whether it can be undone cleanly'). No sibling in the list performs an undo, so an agent can identify this operation without ambiguity.

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?

Explains the decision context well: conflicts mean later edits exist, undoing anyway discards them, and the free conflict check runs before anything changes so the default is informative. It stops short of naming a sibling to inspect first (e.g. get_transaction/list_transactions) or explicitly saying when not to undo.

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