Replace a page's entire layout
elementor_replace_page_treeReplace an entire Elementor page’s element tree to generate a new layout from scratch. This overwrites all existing content and takes a snapshot first; use batch editing for existing-page edits.
Instructions
Overwrite a page's whole element tree. This discards the existing layout completely, so reach for it when generating a page from scratch rather than to make a change. A snapshot is taken first. For edits to an existing page use elementor_batch_edit instead.
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": {
"postId": "<postId>",
"elements": "<elements>"
},
"name": "elementor_replace_page_tree"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site | No | Configured site name. Omit to use the default site. | |
| label | No | ||
| postId | Yes | WordPress post ID of the Elementor page, post or template. | |
| confirm | No | Must be true — this replaces everything on the page. | |
| elements | Yes | The complete new element tree. An empty array clears the page. |