Make a small edit to a report
edit_reportChanges a few parts of a report without sending the whole document again, saved as a NEW newest version (earlier versions stay). Send the newest version number you read and the edits (the edits field lists each kind), applied in order, all or none: an edit that cannot apply saves nothing and the answer names it. If someone saved a newer version since, the answer is stale with its number: read it, check each edit still fits, and send the same edits again (never the whole document). The answer gives the new version's number and, when every edit can be undone, an undo list to send as edits against it. If a public link still shows an older version because the new one failed the share check, warning and linkLag say which link and which part held it: tell the person, take that part out, and save again. A value too large for one call (a design with a page per screen size) goes as ?as=text uploads to upload_report_file, named by the tool's _file field or by text_files; it is checked as if sent inline.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"report_id": "<report_id>",
"expected_version": "<expected_version>"
},
"name": "edit_report"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| edits | No | The edits, applied in order, all or none (or send edits_file). Each is one of: {op:"replace-text", old, new, id?} (old occurs exactly once, in block id or anywhere; new may be empty); {op:"replace", block} (same id); {op:"insert", block, after?|before?} (new id; neither = end); {op:"remove", id}; {op:"move", id, after?|before?}; {op:"change-canvas", id, changes:[{target, box?:{x,y,width,height}, text?, link?: board id|null}]} (moves, sizes, rewords or links parts of a design); {op:"replace-page", id, html} (an interactive page's whole new document; its files and settings stay); for a table or checklist row found by key (its first column, or by:"<column label>"): {op:"replace-cell", id, key, column, value}, {op:"replace-row", id, key, row}, {op:"insert-row", id, row, after?|before?} (new key), {op:"remove-row", id, key}. change-canvas, replace-page and the row edits can be undone. | |
| report_id | Yes | The report (list_reports gives ids). | |
| edits_file | No | In place of edits: the sha256 of a ?as=text upload of the whole list as JSON; text_files then point into it ("/0/block/html" is the first edit's block HTML). | |
| text_files | No | Large texts sent as files instead of inline: each one PUT to upload_report_file's uploadUrl with ?as=text (its textCurl), then put at its pointer, such as "/0/block/html". Every text a block holds can go this way: a page's HTML, a supporting file's text, a long paragraph. | |
| workspace_id | No | Workspace id from whoami; omit when there is one. | |
| expected_version | Yes | The report's newest version number when you read it: the edits apply to that version. |