Skip to main content
Glama

Undo and Redo History

manage_history
Destructive

Undo or redo the most recent state change for the active badge, restoring its prior snapshot and clearing the redo stack on new mutations.

Instructions

Undo or redo the most recent state mutation for the active badge, restoring the prior per-badge snapshot and clearing the redo stack on a new mutation. Both directions mutate Novel state and persist immediately (readOnlyHint false). The stack is per badge and capped by TTRPG_MAX_SNAPSHOT_DEPTH, and a pending workflow decision blocks both until resolved with respond_decision. Use when: reverting the last mutation (undo) or restoring an undone one (redo). Do NOT use when: an older change is the target — re-run the owning tool (for example manage_story), because only the most recent mutation is stacked.

Input Schema

NameRequiredDescriptionDefault
actionNoWhich direction to move: undo (revert the last mutation) or redo (re-apply the last undone mutation). Defaults to undo.

Output Schema

NameRequiredDescriptionDefault
textNoHuman-readable text envelope mirroring the structured result (REQ-001, REQ-548a).
statusYesMachine-readable result status: OK, NEED_INPUT, WARNING, PARTIAL, or an error category (REQ-002, REQ-548c).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.3

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=true, and non-idempotence, so the safety profile is covered. The description earns credit for adding genuinely non-obvious behavior: immediate persistence, per-badge stack scope, a cap via TTRPG_MAX_SNAPSHOT_DEPTH, redo-stack clearing on a new mutation, and blocking by a pending workflow decision. It does not, however, describe what a restored snapshot affects or what the response reports.

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?

Front-loads the action and scope, then behavior, then use/do-not-use routing — a sensible order with no filler. The opening sentence is long and packs several constraints together, which costs a little readability but nothing is redundant.

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?

An output schema exists, so return values are covered, and annotations cover the mutation safety profile. The description supplies the remaining gaps an agent needs (stack scope, depth cap, decision blocking, alternative for older changes) for a two-direction, destructive undo tool.

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 coverage is 100% and the single enum parameter's description already defines both values and the undo default. The description adds the conceptual constraint that only the most recent mutation is in play, which sharpens interpretation of the 'undo' value but does not add syntax or format detail beyond the schema.

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 pair (undo/redo) plus the exact resource scope: the most recent state mutation for the active badge. The scope ('most recent', 'per-badge') is what distinguishes it from sibling tools like manage_story that also mutate Novel state.

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?

Provides explicit 'Use when' (reverting the last mutation, restoring an undone one) and 'Do NOT use when' (an older change is the target), naming the correct alternative behavior: re-run the owning tool such as manage_story. It also names respond_decision as the unblocking prerequisite.

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