run
Execute a Pyxel script headlessly for a frame budget or until a condition holds, with scheduled inputs and state, screen, or video snapshots for verification.
Instructions
Run a Pyxel script headlessly for a frame budget or until a condition holds, with scheduled input and state, screen, or video capture. screen_image snapshots with inline=true also return the PNG as image content, and a single inline frame may omit its output path.
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": {
"script": "<script>",
"frames": "<frames>"
},
"name": "run"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| until | No | ||
| frames | Yes | ||
| inputs | No | ||
| script | Yes | ||
| timeout | No | ||
| snapshots | No | ||
| random_seed | No | ||
| stall_window_frames | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| log | Yes | ||
| errors | Yes | ||
| seeded | Yes | ||
| snapshots | Yes | ||
| until_met | No | True once `until` held, False when it was evaluated without ever holding, None when it was never evaluated. | |
| exit_status | Yes | ok includes reaching the frame budget, matching until, or an explicit pyxel.quit(). Cleanup failures are reported as crashed. | |
| frame_count | Yes | Number of completed update/draw pairs; excludes a partial quit frame. | |
| elapsed_seconds | Yes |