editor
DocumentsFull
The editors as a user drives them: open and close, undo and redo, the selection, the armed tool, the properties panel, the view's zoom and page, and the library picker. What a document holds is doc_read / doc_edit's.
Needs the Full level, which is the default for any client holding the bearer token.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
action | string one of "open", "close", "undo", "redo", "select", "seek", "play", "pause", "step", "arm", "panel", "zoom_view", "page", "pick" | yes | What to do. open: Open an item in its editor (image, video, audio, scancode, font) and wait until it has loaded. (id, path) close: Close the open editor: Save & Exit, or with save false its Discard (every change this session made is reverted). (save) undo: Undo the open editor's last step. redo: Redo the step undo took back. select: Select elements by id in the open editor, as clicking them would; ids [] selects nothing. In a video: clips (several), or one zoom, 3D move or placement move. (ids) seek: Move the open video's playhead to ms of the edited video. Changes nothing in the video. (ms) play: Play the open video from its playhead (the preview). pause: Pause the open video. step: Step the open video's playhead by frames (negative: back), pausing first. (frames) arm: Arm a drawing tool (the next drag draws one), or select to put it down. style sets how the next one looks, as the Tools page does with nothing selected; the result's style is what it will draw with. (tool, mode, style) panel: Show the properties panel on a page (its rail label), or hide it with visible false. (page, visible) zoom_view: Zoom the image editor's view: fit, width, actual (100%), in or out; and with center [x, y] (the picture's pixels) scroll it there, as a hand pan does. Changes nothing in the document. (to, center) page: Show a page of a multi-page image (1 is the first). (page) pick: Answer the library picker an editor opened (+ Image, Add clip…): the item by id, or cancel. (id, path, cancel) |
id | string | no | open / pick: the item's id. |
path | string | no | open / pick: or its path or name. |
save | boolean | no | close: false discards the session (default true). |
cancel | boolean | no | pick: close the picker with nothing. |
ids | string[] | no | select: element ids ([] for none). |
tool | string | no | arm: box, circle, arrow, line, text, step, redact, highlight, pen, cutout, magnifier, crop, or select. |
mode | string | no | arm: box, circle, arrow or line's drawing mode (outline, filled, shaded, drawn, shape), or redact's (secure, blur, pixels, erase). |
style | object | no | arm: the next annotation's look, by the property names doc_edit uses for that kind (describe kind box): stroke_color, stroke_width, fill, font... Its shape and place come from the drag. A tool group shares one stroke width (box, circle, line and pen). |
page | string | no | panel: the page, by its rail label lower-cased with dashes. Image editor: layout, background, color, 3d, layers, annotation. Video editor: layout, background, color, 3d, mouse-pointer, zoom, keystrokes, captions, audio, webcam, annotation. page: the page number. |
visible | boolean | no | panel: false hides it. |
to | string one of "fit", "width", "actual", "in", "out" | no | zoom_view: fit, width, actual, in or out. |
center | number[] | no | zoom_view: [x, y] in the picture's pixels to bring to the middle of the view (after to, if both). |
ms | integer | no | seek: where, in ms of the edited video. |
frames | integer | no | step: how many frames (negative: back). |
Example
A JSON-RPC call to POST http://localhost:21516/mcp with the bearer token, filling in the required parameters:
{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "editor", "arguments": { "action": "open" } }}See the MCP server overview for how to connect a client and where the token lives.