Skip to main content
Glama

end_transaction

Destructive

Commit the transaction opened by begin_transaction, merging all edits inside it into one undo entry on the editor's stack. Use cancel to discard instead.

Instructions

Close the transaction opened by begin_transaction and COMMIT it, so everything done inside becomes one entry on the editor's undo stack (undo_count grows by one). Pair it with every begin_transaction -- leaving one open makes later edits silently join it. Use cancel_transaction instead when you want the batch thrown away rather than kept.

Returns: { success: bool, transaction_index: int (the one that was closed), undo_count: int after the commit }

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 declare destructiveHint=true and idempotentHint=false, but the description adds substantial behavioral context: it explains the commit collapses work into one undo stack entry, notes undo_count grows by one, warns about silently merged edits, and documents the return payload. This goes well beyond the safety profile already in annotations.

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 core action, then adds the pairing warning and the cancel_transaction alternative before closing with the return contract. Every sentence earns its place, and nothing is repeated from the schema or annotations.

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 zero-parameter, side-effecting transaction tool, the description covers the essential contract: what commit means for the undo stack, the risk of leaving a transaction open, the correct alternative tool, and the return shape. Nothing an agent needs 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 zero parameters, so the schema has nothing to explain and the 0-param baseline of 4 applies. The description does usefully document the return object (success, transaction_index, undo_count) despite there being no output schema, but there are no parameter semantics to add.

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: 'Close the transaction opened by begin_transaction and COMMIT it.' It distinguishes itself from the sibling tools begin_transaction and cancel_transaction by describing exactly what committing does.

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 pairing guidance ('Pair it with every begin_transaction'), explains the failure mode of not doing so ('leaving one open makes later edits silently join it'), and names the alternative for the opposite intent ('Use cancel_transaction instead when you want the batch thrown away rather than kept').

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