Skip to main content
Glama

Undo and Redo History

manage_history
Destructive

Undo or redo the most recent Novel state mutation for the current badge, restoring the prior content snapshot. Use it to revert the last change or reapply an undone one.

Instructions

Undo or redo the most recent state mutation for the calling badge, restoring the Novel content snapshot captured before it. Append-only logs, checkpoints, and the undo/redo stacks are preserved rather than rolled back, and the response reports success without a diff. Both directions mutate Novel state and persist immediately. 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.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "manage_history"
  }
}

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.6/5.0
Behavior5/5

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

Goes well beyond the annotations (destructiveHint=true, idempotentHint=false) by disclosing what is NOT rolled back (append-only logs, checkpoints, stacks), that the response reports success with no diff, that writes persist immediately in both directions, and that the stack is per-badge and capped by TTRPG_MAX_SNAPSHOT_DEPTH. The pending-decision blocker is exactly the kind of runtime behavior annotations cannot express.

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 purpose, then behavior, then use/do-not-use routing — a sound structure with little filler. It is dense (config variable name, snapshot, checkpoints in one sentence), but each clause conveys operational information rather than restating the name.

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, non-idempotent mutation tool, the description covers scope, side effects, persistence, stack limits, blocking conditions, and the correct alternative — the essentials an agent needs before calling. Return-value detail is appropriately omitted since an output schema exists.

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 already documents undo vs. redo, including the undo default, so the schema carries the burden. The description only reinforces the semantics by scoping both directions to the most recent mutation for the calling badge; it adds no syntax or format detail beyond that.

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) and a precise resource ('the most recent state mutation for the calling badge'), including the restoration semantic ('Novel content snapshot captured before it'). It is distinguishable from siblings like manage_story, which it explicitly names as the alternative for older changes.

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?

Contains explicit 'Use when' (revert last mutation / restore an undone one) and 'Do NOT use when' (older change is the target) clauses with a named fallback ('re-run the owning tool (for example manage_story)'). It also names a blocking precondition and the tool that clears it (respond_decision).

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