Skip to main content
Glama

Undo, redo or restore a version

canvas_undo
Destructive

Take back your last draw call on the open canvas (or your call number b). A call is not taken back while a later call still on the canvas changed the same thing (the reply names it: undo that first, or restore). Nothing is lost: action "redo" brings back your call undone last, "history" lists the canvas's versions (who, when, what), and "restore" with to (a revision) makes the canvas look as it did then, as one new change that can itself be undone. to takes any revision, not only those history lists (each call's reply gives the canvas revision after it), so going back many calls is one restore, not many undos. Everyone sees each change. "diff" changes nothing: the objects added, removed and changed between two revisions (from, and to or now), or between this canvas and another (against: the canvas it was copied from with canvas_new from), matched by name (else key), with what changed in each (its fields, a group's parts, a text's words before and after), and the artboards and kit. look: true also sends the two pictures, before and after, with what changed boxed and named (width, default 800; two server pictures).

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

Input Schema

NameRequiredDescriptionDefault
bNo
toNorestore: a revision (from history, or the canvas revision a call's reply gave); diff: the later revision (default now)
fromNodiff: the earlier revision of this canvas
lookNodiff: also the two pictures, before and after, with what changed boxed
widthNodiff with look: pixels across (default 800)
actionNo
canvasNo
againstNodiff: another canvas (a link or id), such as the one this was copied from with canvas_new from: what differs from it
expected_revisionNoApply only at this drawing revision

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations declare destructiveHint=true and readOnlyHint=false; the description adds the important nuance that undo is recoverable via redo, that restore is itself a new undoable change, and that "Everyone sees each change" — a collaboration consequence. It also discloses the cost/behavior of look: true (two server-rendered pictures) and that diff is side-effect free. It does not cover permissions or failure modes, and "Nothing is lost" sits in mild tension with the destructive hint, though it describes reversibility rather than contradicting it.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It opens with the primary action, so it is front-loaded, and nearly every clause carries information. But it is a single dense run-on paragraph with nested parentheticals that covers five distinct actions at once, forcing the reader to parse rather than scan; a per-action breakdown would be considerably easier to use.

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?

There is no output schema, and the description compensates well by describing what history returns (who, when, what), what diff returns (objects added/removed/changed, fields, group parts, text words before and after, artboards and kit), and what the look images contain. The main gap is the undescribed `expected_revision` opt-in and the observed failure reply ("the reply names it"), which the agent must handle.

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?

With 9 parameters at 67% schema coverage, the description earns its place by explaining that `b` is the caller's call number, that `to` accepts any revision including ones harvested from earlier call replies, and that `against` is typically the canvas this was copied from via canvas_new from. It also reinforces `from`/`to`/`now` and width (default 800) for diff. It says nothing about `canvas` or `expected_revision`, leaving concurrency control entirely to the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the core action concretely ("Take back your last draw call on the open canvas") and individually names each mode of the `action` enum: undo, redo, history, restore, diff. It is clear what the tool does, but the bundling of a state-mutating undo with a read-only comparison (diff) muddies the tool's identity, and nothing distinguishes it from the sibling photo_undo.

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?

Real guidance is present: it warns that a call is not undone while a later call changed the same thing ("undo that first, or restore") and explains the choice between many undos and a single restore ("going back many calls is one restore, not many undos"). It also notes diff changes nothing, steering the agent to it for inspection. What is missing is any routing guidance versus sibling tools.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.