Skip to main content
Glama

Transaction History

transaction-history
Destructive

Undo or redo staged revisions in the active transaction without writing source files; pass the current snapshot and use the returned snapshot for subsequent mutations.

Instructions

Undoes or redoes one staged revision within the active transaction, changing the in-memory solution without writing source files. Use this to revise staged work; use transaction-rollback to discard the entire transaction. Supply the current expectedSnapshot and use the returned snapshot for subsequent mutations. The returned transaction reports canUndo and canRedo; a move beyond available history is rejected. A conflicted transaction must be rolled back before history can change.

Input Schema

NameRequiredDescriptionDefault
directionYesDirection to move through transaction history: Undo or Redo.
workspaceNoProvide workspaceId, alias, path, or any combination.
expectedSnapshotYesEcho the snapshot returned with the data or transaction state used to construct this request.

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 declare destructiveHint=true and idempotentHint=false, but the description adds materially: mutations are in-memory and do not write source files, snapshot chaining semantics (use the returned snapshot for subsequent mutations), canUndo/canRedo reporting, and rejection beyond history. This goes well beyond the structured safety flags.

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-loaded with the core action, followed by alternative routing, snapshot contract, and preconditions. Every sentence carries distinct information with no redundancy.

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?

With an output schema present, return details needn't be fully explained, yet the description still covers the snapshot contract and canUndo/canRedo reporting. For a destructive, snapshot-dependent mutation tool, the description gives everything an agent needs to invoke it correctly.

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 the baseline is 3. The description adds real meaning beyond the schema by explaining the purpose of expectedSnapshot as a chaining token ('use the returned snapshot for subsequent mutations') and framing direction as a move through history, which the enum alone does not convey.

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 precise verb pair (undoes/redoes) and a precise resource (one staged revision within the active transaction), scoped to in-memory state. It explicitly names the sibling transaction-rollback and the contrasting behavior, so an agent can distinguish it from the other transaction tools without inspecting schemas.

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 routes between alternatives: 'Use this to revise staged work; use transaction-rollback to discard the entire transaction.' It also states the precondition that a conflicted transaction must be rolled back first and that a move beyond available history is rejected — clear when-to-use and when-not-to-use guidance.

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