Undo, redo or restore a version
canvas_undoTake 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
| Name | Required | Description | Default |
|---|---|---|---|
| b | No | ||
| to | No | restore: a revision (from history, or the canvas revision a call's reply gave); diff: the later revision (default now) | |
| from | No | diff: the earlier revision of this canvas | |
| look | No | diff: also the two pictures, before and after, with what changed boxed | |
| width | No | diff with look: pixels across (default 800) | |
| action | No | ||
| canvas | No | ||
| against | No | diff: another canvas (a link or id), such as the one this was copied from with canvas_new from: what differs from it | |
| expected_revision | No | Apply only at this drawing revision |