Skip to main content
Glama

Undo the last change

undo
Destructive

Reverts the last map edit from its pre-change snapshot, restoring blocks and entities; call repeatedly to step back through earlier changes.

Instructions

Puts back the area changed by the most recent change (place, fill, copy, clear, import, or run_command with backup_area), from the snapshot taken before it: blocks, and entities when the snapshot has them (entities added since are removed, removed ones are summoned again). Call again to go further back; status lists what can be undone.

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": "undo"
  }
}

Input Schema

NameRequiredDescriptionDefault
confirmNoSet true only after the person agreed to this change (needed while confirmDestructive is on).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the mutation profile is known. The description adds real value beyond that by disclosing the exact blast radius: blocks are restored, entities added since the snapshot are removed and removed ones are re-summoned. It stops short of covering failure modes (what happens when the undo stack is empty) or the confirm gate, which lives only in the schema.

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?

The core action and scope are front-loaded in the first clause, with the parenthetical operation list and entity behavior following as qualifications. Two sentences, no filler; the only mild density cost is the long nested clause about the snapshot.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-optional-parameter mutation tool with no output schema, the description covers action, scope, reversibility semantics (repeat calls), and the inspection alternative. The absence of any statement about the empty-stack / error case is a minor residual gap rather than a blocking omission.

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 description coverage is 100% and the single `confirm` parameter is fully documented in the schema ('Set true only after the person agreed to this change'). The description never mentions confirm, so it adds no meaning beyond the structured field — the baseline 3 applies.

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 ('Puts back the area changed by the most recent change') and goes further by enumerating exactly which operations are undoable (place, fill, copy, clear, import, run_command with backup_area). An agent can immediately tell this apart from siblings like restore_world or backup_world.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear usage context: 'Call again to go further back' explains repeat invocation semantics, and 'status lists what can be undone' routes the agent to the correct sibling for inspecting the undo stack. It does not explicitly state exclusions (e.g., how this differs from restore_world for a full-world rollback), which keeps it short of a 5.

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