Skip to main content
Glama

cancel_transaction

Destructive

Abort an open transaction to roll back edits made within it, without recording an undo entry. Use when a multi-step edit goes wrong halfway to discard changes cleanly.

Instructions

Abort the transaction opened by begin_transaction: the edits made inside it are rolled back and NO entry is written to the undo stack (undo_count is unchanged). The escape hatch when a multi-step edit goes wrong halfway -- cleaner than committing with end_transaction and then calling undo, which leaves history behind.

Returns: { success: bool, transaction_index: int (the one that was cancelled), undo_count: int (unchanged -- nothing was recorded) }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already mark this as destructive (destructiveHint=true, readOnlyHint=false), but the description goes further: it specifies that edits are rolled back, that no undo entry is recorded, and that undo_count remains unchanged. It also manually documents the return payload (success, transaction_index, undo_count) despite no output schema. This is rich behavioral disclosure beyond structured fields.

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?

Front-loads the verb and core effect in the first sentence, follows with a compact usage note, and closes with a concise Returns block. No filler; every sentence contributes.

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 parameterless destructive transaction tool with no output schema, the description covers purpose, usage context, alternatives, side effects on the undo stack, and the exact return shape. Nothing needed to invoke it correctly is missing.

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 tool takes no input parameters, so the baseline is 4. The description cannot and need not add parameter semantics; it instead documents return values, which is outside this dimension.

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 action (Abort) on a named object (the transaction opened by begin_transaction), enumerates the effect (edits rolled back, no undo entry), and implicitly contrasts with end_transaction+undo. An agent can distinguish this from begin_transaction, end_transaction, and undo without opening any 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?

Explicitly identifies the situation ('when a multi-step edit goes wrong halfway') and names the alternative path (end_transaction then undo) with the reason to prefer this tool ('cleaner... which leaves history behind'). No inference needed.

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

Deploy Server

Other Tools