Skip to content

MCP tools

history

History, undo and redo. Change log (action=list, newest first, with actor; actor, cursor, limit: list only); undo/redo your own latest step (one per call); revert to a revision or checkpoint as a new step (dry_run previews); diff two revisions; checkpoints, checkpoint, rename_checkpoint, remove_checkpoint name revisions.

Last updated:

Change log (action=list, newest first, with actor; actor, cursor, limit: list only); undo/redo your own latest step (one per call); revert to a revision or checkpoint as a new step (dry_run previews); diff two revisions; checkpoints, checkpoint, rename_checkpoint, remove_checkpoint name revisions. Undo skips (and reports) others' later changes. domain=image (image_id): all but list.

Behaviour#

These are the annotations of the tool definition, the hints a client uses to decide whether to ask before a call. history is listed by tools/list.

PropertyValue
Read onlyno
Destructiveno
Idempotentno
Reaches outside the workspaceno

Input#

ArgumentTypeRequiredNotes
domainvideo, imagenodefault "video"
image_idstringnopattern ^img_[0-9a-hjkmnp-tv-z]{10}$
project_idstringnopattern ^prj_[0-9a-hjkmnp-tv-z]{10}$
timeline_idstringnopattern ^prj_[0-9a-hjkmnp-tv-z]{10}$
actionstring, one of 9 valuesnodefault "list"
actorstringno
cursorstringno
limitintegernomin 1; max 100; default 20
revisionintegernomin 1
untilintegernomin 1
namestringno
new_namestringno
notestringno
dry_runbooleanno

Output#

A result has a text block, written for the model, and structured content with these members.

MemberTypeAlways presentNotes
revisionintegeryes
kindundo, redo, revertno
entriesarray of objectno
skippedarray of objectno
next_cursorstring or nullno

Errors#

A call over HTTP without credentials fails with E_UNAUTHORIZED, and too many calls with E_RATE_LIMITED. Both are in the error codes.

Safety#

  • undo and redo act on your own latest step only. A change another actor made after yours is skipped and reported.
  • Undo is itself a step and can be redone.

Next steps#

Ask the agent

Undo my last change.

The call

tools/call
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "history",
    "arguments": {
      "project_id": "prj_7k2m9x4q1b",
      "action": "undo"
    }
  }
}

The result

result
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "…"
      }
    ],
    "structuredContent": {
      "project_id": "prj_7k2m9x4q1b",
      "revision": 14,
      "kind": "undo",
      "applied": true
    }
  }
}

The values are illustrative. The text block holds the same result written for the model; its wording is left out here.