doc_read
DocumentsRead-only
A document's model: every element (annotations, images, tails...) with all its properties, and its sections (canvas, stage, camera, document), each in the shape doc_edit's set takes. Points and rects are the picture's own pixels (canvas.picture_at says where the picture sits in doc_render's image). With no id, the item open in an editor, else the library's current item. describe explains every kind and property.
Available at every access level, including a client that sent X-Access-Level: readonly.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | no | The item's id. |
path | string | no | Or its path or name. A .md or .txt anywhere on disk too, by its full path: outside the library the user is asked once to let you into its folder. |
page | integer | no | A multi-page image's page (1 is the first; default the one on screen). |
ids | string[] | no | Only these elements (ids, or section names); with kinds, these as well as those. |
kinds | string[] | no | Only elements of these kinds; with ids, these as well as those. |
text | boolean | no | Also the words in the picture (read from its pixels), with where each line is. |
codes | boolean | no | An image: also the QR codes and barcodes in the picture, decoded (text and format), as Extract QR/Barcode reads them. A scancode: what it scans as, drawn and decoded ([] when it doesn't scan), to check an edit. |
palette | integer | no | An image: also the picture's main colours, this many (2 to 16), most used first, each color and its share in percent. |
pauses | boolean | no | A video or an audio recording: also its long pauses, the quiet stretches of what plays (start_ms, end_ms, and cut_ms: what doc_edit's do shorten_pauses would cut from each with its defaults; in a video, where a clip is heard and never through a word). |
levels | boolean | no | An audio recording: also what it measures as, to check an edit you can't hear. The edited track inside the trim, measured as an export would render it (volumes, fades and crossfades included): integrated_lufs (ITU-R BS.1770; null when too quiet or too short to measure), true_peak_dbtp and peak_dbfs (null for silence), the same three for each place on the timeline (places, each naming its clips on every track; a place runs from where it starts to where the next starts, so at a seam the clips before are still fading out in them: a quiet place after a loud one peaks above its own level), and profile, the track in up to 60 equal stretches of bucket_ms with each one's peak in dBFS (-90 is silence). noise_floor_db, speech_db and suggested_silence_db are the quiet, the speech and the line between them as shorten_pauses hears them. It decodes the recording, so a long one takes seconds. An image: also how the picture measures as drawn (its grade and annotations in it), to check a tone or colour edit you can't see: luma_mean, luma_p1, luma_median and luma_p99 (Rec. 709 brightness, 0 to 255), shadows_clipped_pct and highlights_clipped_pct (the share at black, luma 2 or under, and at white, 253 or over), channel_means (red, green and blue, 0 to 255: a cast shows as one above the others), saturation_pct, and histogram_pct, the share in each of 16 equal brightness bands, darkest first. |
new_style | string[] | no | An image or a video: how a new element of each of these kinds looks if doc_edit adds it now without style properties: in a document open in its editor, the user's current tool style (as one they drew would look); otherwise the app's default look. Each kind's look properties, as doc_read lists them. |
at_ms | integer | no | For a video: read each annotation that animates as it is at this moment (default: at its start). |
coords | string one of "doc", "render" | no | doc (default): the picture's own pixels (a video item's: the recording's, or the canvas's for a canvas item). render: the pixels of your last doc_render of this document, as you saw it. |
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": "doc_read", "arguments": {} }}See the MCP server overview for how to connect a client and where the token lives.