render_ui
Render a Brilliant UI component in an exact declarative state offscreen and capture it to an image file without touching the live app.
Instructions
Render a Brilliant UI component into an EXACT declarative state and capture it to an image file, offscreen, without touching the live app. component is a stager id (call list_stagers to enumerate them and their state schemas); state is the component-specific declarative state. Optionally draw highlight boxes over sub-targets (the scene registers "ui-stage.*" ids) and override the stage size. Writes lossless WebP by default. Desktop-only: it writes an image file, so it is not available in the web editor.
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": {
"component": "<component>",
"state": "<state>",
"outputPath": "<outputPath>"
},
"name": "render_ui"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| state | Yes | Component-specific declarative state. REQUIRED. See the component's stateSchema from list_stagers. | |
| width | No | Logical stage width override (defaults to the stager's defaultSize). | |
| format | No | Image format: "webp" (default, lossless) or "png". | |
| height | No | Logical stage height override (defaults to the stager's defaultSize). | |
| component | Yes | Stager id to render (e.g. "ai-chat-panel"). REQUIRED. Call list_stagers for the available ids and their schemas. | |
| background | No | Optional. true answers a `job:` id at once and runs the call on; wait({job}) blocks until it ends and answers its result. An edit waits its turn behind other agents' writes instead of refusing. Use it for a call that may outlast your client's timeout. | |
| highlights | No | Boxes to draw over the render. Each is either {target: "<ui-stage.* id>"} or {rect: [x, y, w, h]} in captured-image logical pixels. | |
| outputPath | Yes | Absolute file path to write the image to. REQUIRED. | |
| pixelRatio | No | Device-pixel scale for the capture (default 2). |