Edit element
edit_elementThe editor’s element gestures, as one write (one version, one undo), refused for its reasons and in its words with nothing written. gesture "insert" adds node (your own element; its ids are minted here) or presetId (an Add panel card: describe_element_type (area design) {presets: true}) by targetNodeId: where "before"/"after" beside it, "inside" at its end; left out, the Add panel’s rule. Answers insertedId, parentId and index. presetId "table" takes rows (its words, the first row the header) to fill it in the same call. On nodeId (or nodeIds): duplicate (count: copies), delete, moveUp, moveDown, wrapInBox (put in a box; neighbours share one), unwrap (take a box or band apart, its contents kept in its place), makeColumns (count: equal columns), removeColumn, addColumn (on a row), addColumnBefore / addColumnAfter (on a column), insertRowAbove, insertRowBelow (count: rows). baseVersion: 409 when stale. Full reference: get_reference {topic:"layout"}; get_reference {topic:"elements"}.
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": {
"siteId": "<siteId>",
"pageId": "<pageId>",
"gesture": "<gesture>"
},
"name": "edit_element"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| node | No | insert: an element of your own (the shape apply_ops inserts; ids and empty props optional) | |
| rows | No | insert presetId "table" only: its rows, the first the header row, e.g. [["Dish","Price"],["Espresso","£2.50"]] | |
| count | No | duplicate: copies (default 1); insertRowAbove / insertRowBelow: rows; makeColumns: columns | |
| where | No | insert: beside or inside the target; left out: the Add panel’s rule | |
| nodeId | No | The element (or nodeIds); not for insert | |
| pageId | Yes | Page id, or a reserved document ("site-header", "product-template"…) | |
| siteId | Yes | Site id (from list_sites) | |
| gesture | Yes | ||
| nodeIds | No | Several elements, in one write | |
| presetId | No | insert: an Add panel card by id or name, e.g. "features" or "three-points" | |
| checkLinks | No | unwrap: also check other pages’ links to it | |
| baseVersion | No | The version read; omitted = the current one | |
| targetNodeId | No | insert: the element it goes by (left out: the end of the page) |