Skip to content

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

NameTypeRequiredDescription
actionstring one of "open", "close", "undo", "redo", "select", "seek", "play", "pause", "speed", "step", "arm", "panel", "zoom_view", "page", "pick"yesWhat to do. open: Open an item in its editor (image, video, audio, scancode, font, note) and wait until it has loaded. A .md or .txt outside the library opens by its full path in a window of its own and joins Open Recent; one that isn't there yet opens empty, and its file is made only once something is written in it. (id, path) close: Close the open editor: Save & Exit, or with save false its Discard (every change this session made is reverted). Returns once the save or revert is on disk, so a read, export or share right after sees it. (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. In audio: clips on any track (several, as shift-clicks add them; the last named is the one whose handles show), or with range a stretch of the timeline as a drag selects it. (ids, range) seek: Move the open video's or audio's playhead to ms of the edited video or track. Changes nothing in it. (ms) play: Play the open video or audio from its playhead (the preview), at the speed chosen. pause: Pause the open video or audio. speed: Set the open video's or audio's playback speed to rate: 0.5, 1, 1.5 or 2 (the speed button). Or, a video, review true: Review, which plays each piece (a clip or a gap) at its length ÷ 2 s, from 1x to 8x, until another speed is chosen; it doesn't play by itself, play does. The preview only; state reports editor_speed (with Review, the piece's at the playhead) and editor_reviewing. (rate, review) 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)
idstringnoopen / pick: the item's id. An item with no editor here (a file of another kind, a Word or Excel document) opens in its own app, or is only shown in its folder when it could run; open_note says which.
pathstringnoopen / pick: or its path or name.
savebooleannoclose: false discards the session (default true).
cancelbooleannopick: close the picker with nothing.
idsstring[]noselect: element ids ([] for none).
rangeinteger[]noselect, in the audio editor: [start_ms, end_ms] of the edited track to select, as a drag does ([] clears it). state reports it as editor_range_ms.
toolstringnoarm: box, circle, arrow, line, text, step, redact, highlight, pen, cutout, magnifier, crop, or select.
modestringnoarm: redact's mask (secure, blur, pixels, erase). A shape's look is style, in doc_edit's properties (hand_drawn, fill…).
styleobjectnoarm: 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).
pagestringnopanel: 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, visualizer, audio, webcam, annotation. page: the page number.
visiblebooleannopanel: false hides it.
tostring one of "fit", "width", "actual", "in", "out"nozoom_view: fit, width, actual, in or out.
centernumber[]nozoom_view: [x, y] in the picture's pixels to bring to the middle of the view (after to, if both).
msintegernoseek: where, in ms of the edited video or track.
framesintegernostep: how many frames (negative: back).
ratenumbernospeed: 0.5, 1, 1.5 or 2.
reviewbooleannospeed, in a video: Review instead of a rate, each piece in about 2 s (1x to 8x).

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.