Skip to main content
Glama

Transaction Rollback

transaction-rollback
Destructive

Discard the active transaction and all staged revisions, restoring the in-memory baseline without changing files on disk. Use it to abandon staged work or clear a conflicted transaction.

Instructions

Discards the active transaction and all its staged revisions, restoring its in-memory baseline without changing files on disk. Use this to abandon staged work or clear a conflicted transaction; use transaction-history to undo or redo individual staged revisions. Rollback ends the transaction, so its staged history cannot be restored with redo. It cannot undo an earlier commit. If the returned state is WorkspaceOutOfDate after a conflicted rollback, call workspace-reload before continuing.

Input Schema

NameRequiredDescriptionDefault
workspaceNoProvide workspaceId, alias, path, or any combination.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.6

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and idempotentHint=false, yet the description adds the semantics annotations cannot: staged revisions are permanently lost (no redo), disk is untouched, and the transaction is terminated. It also gives a recovery branch for a WorkspaceOutOfDate result, which is real operational guidance beyond the 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?

Four sentences, each carrying a distinct fact: what is discarded, when to use it, the irreversible consequence, and the error recovery. The destructive consequence is front-loaded in sentence one rather than buried.

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 destructive mutation with an output schema already covering return shape, the description supplies exactly the missing pieces: irreversibility, non-persistence to disk, transaction termination, and the conflicted-rollback follow-up. Nothing an agent needs to call it safely is absent.

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% and the single workspace parameter is fully documented in the schema, so the baseline is 3. The description adds slight value by framing the call as operating on 'the active transaction', implying the workspace selector identifies which transaction context is discarded, but it does not elaborate on identifier forms.

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 ('Discards the active transaction and all its staged revisions') plus the crucial scope boundary: it restores the in-memory baseline without changing files on disk. This immediately separates it from transaction-commit, transaction-preview, and transaction-history, which share the same object.

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?

Names two concrete triggers ('abandon staged work', 'clear a conflicted transaction') and explicitly routes per-revision undo/redo to transaction-history. It also states the exclusion that rollback cannot undo an earlier commit, which prevents a common misuse.

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