broadcast_element_command
Broadcast real-time UI updates via WebSocket for ephemeral modifications. Demonstrates UI changes without saving them.
Instructions
Push real-time UI updates via WebSocket. Use for SHOW/DISPLAY/DEMONSTRATE requests.
Actions: update (modify element), create (ephemeral element), batch (multiple updates), delete.
Changes are EPHEMERAL (not saved). For persistent changes, use update_element or html_to_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": {
"action": "<action>"
},
"name": "broadcast_element_command"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | The type of command to broadcast | |
| element | No | UUID of the element to modify (required for update, delete, create) | |
| changes | No | Object containing attribute changes (e.g., { classes: ["bg-blue-500"], text: "Hello" }) | |
| updates | No | Array of updates for batch action: [{ element: "uuid", changes: {...} }] |