ui_builder_simulate_action
Run a stored design's host logic — the JavaScript in its hostLogic that stands in for the host feeding it, answering host actions by setting host inputs — headless, without a browser: init, then each of actions in order, as the editor's canvas runs it. Each action is {"name": …, "value": …}, exactly what a design's host action sends (a value is text, a whole number or a decimal; omit it for none). Returns summary first, then ok and steps: for init and each action, the program's private state, every host input's values as the canvas would draw them, which inputs the step set, and the error when its answer could not be used. A failing step keeps the values before it and the next action is still sent; a program that overruns its budget stops the run (stopped). Use it to show the logic works (a calculator shows 3 after 1 + 2 =) and to find which key breaks it. Nothing is saved. At most 200 actions.
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": {
"designId": "<designId>"
},
"name": "ui_builder_simulate_action"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token | No | A grant token from poll_access, when you cannot set the X-Compose-Preview-Token header yourself — an MCP client fixes its headers at connect time, so this is how a token approved during this session is used in it. Prefer the header where you control it. | |
| actions | No | Host actions to answer, in order, after init. Omit to run init alone. | |
| designId | Yes | ||
| revision | No | A past revision. Omit for the current one. | |
| agentName | No | Optional agent/client name shown to design viewers; self-reported. | |
| agentModel | No | Optional current model name shown to design viewers; self-reported. Omit when unknown. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| steps | Yes | ||
| digest | No | ||
| schema | Yes | ||
| stopped | No | ||
| summary | Yes | ||
| designId | Yes | ||
| revision | Yes |