Edit page
apply_opsApplies edit-ops to one page, all or nothing: one new version (older ones kept), none when nothing changes (unchanged: true). Each op is an object named by its "op" field: insert{parentId,index,node} (ids you pick, unique on the page) | remove{nodeId} | move{nodeId,parentId,index} | setProps{nodeId,props} | setRichText{nodeId,doc} | inside a text without resending it: addMark{nodeId,match,occurrence?,mark} / removeMark{nodeId,match,occurrence?,markType} / replaceText{nodeId,match,occurrence?,text} / setBlock{nodeId,block,type?,attrs?} (heading, list, quote) — match ≤500, text ≤5000 characters | setStyle{nodeId,style} | setSeo{seo:{title?,description?,ogImageAssetId?,noindex?,hideFromSiteSearch?}} | setAccess{access} | setNodeFields{nodeId,fields}: image {assetId,alt,caption}, button {label,href}. baseVersion: the page's current version (get_page or describe_layout); stale = 409, nothing written. A 422 names the op: failedOp {index, op, field}. Answers the new version; warnings (saved anyway): unreadable text colours, a setSeo title over 70 / description over 160 characters trimmed there, quoting what was cut. Node shapes by example: describe_element_type (area design). Columns: place_block_beside (area design) / resize_cell (area design) / join_cells (area design) / edit_element keep rows totalling 12. Element fields, rich text, links, anchors, every limit: Full reference: get_reference {topic:"ops"}.
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>",
"baseVersion": "<baseVersion>",
"ops": "<ops>"
},
"name": "apply_ops"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ops | Yes | Edit-op objects | |
| pageId | Yes | Page id, or a design: "product-template", "cart-template", "post-template", "site-header", "site-footer" | |
| siteId | Yes | Site id (from list_sites) | |
| baseVersion | Yes | The page version this edit is based on |