update_page_element
Preview and apply changes to a page element's styles, config, text, events, and responsive overrides, returning a diff for user confirmation before saving.
Instructions
Update properties of a specific element in page source. Two-step process: STEP 1: Call with dry_run=true (default) → returns diff of what will change. STEP 2: Show the diff to the user and ask for confirmation. NEVER proceed without explicit user approval. STEP 3: Only after user confirms, call again with dry_run=false to apply. IMPORTANT: You MUST show the diff to the user and get explicit "yes/ok/confirm" before calling with dry_run=false. Skipping confirmation risks data loss. Merge rules: style/config/specials = shallow merge, responsive = merge by bp key. events/bindings = REPLACE the whole array — pass the COMPLETE list (read it first with get_page_element so you don't drop the others); entries are auto-normalized (id + eventName filled in, so you can pass just { action, ...fields } / { target }).
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": {
"page_id": "<page_id>",
"element_id": "<element_id>"
},
"name": "update_page_element"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| style | No | CSS style properties to merge (e.g. {color: '#fff', 'font-size': '16px'}) | |
| config | No | Config properties to merge | |
| events | No | Complete events array (replaces existing) | |
| dry_run | No | Preview only (true) or apply changes (false). Defaults to confirm_mode setting. Use toggle_confirm_mode to change default. | |
| page_id | Yes | Page ID | |
| bindings | No | Complete bindings array (replaces existing) | |
| specials | No | Specials to merge (text, custom_class, custom_css, etc.) | |
| element_id | Yes | Element ID to update (e.g. 'TEXT-3', 'BUTTON-1') | |
| responsive | No | Responsive breakpoint overrides (e.g. {bp1: {style: {...}, config: {...}}}) | |
| allow_shrink | No | Allow the source to shrink by more than half: set it when native elements replaced an oversized embed or custom_css and you have read it first. |