craftos_script
Runs multiple touch, key, text, expectation, and clock-advance steps in one call, returning compact pass/fail details, evidence, and screen deltas for ComputerCraft program testing.
Instructions
Run many steps in one call and get one compact result: [{touch:{name:"HIT"}}, {expect:[{text:"You win"}]}, {advance:30}, ...]. Every touch/key/text waits until the program consumed it and the screen settled; a step fails if the program ignored the input (unless lenient). Stops at the first failure (stopOnFail:false to continue), returns only the failing steps with reasons and nearest matches, saves evidence files, and ends with a compact delta of the screens (ui:"none"|"delta"|"full"). One call replaces dozens of act/ui round trips.
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": {
"id": "<id>",
"steps": "<steps>"
},
"name": "craftos_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Id returned by craftos_session_create. | |
| ui | No | delta | |
| steps | Yes | ||
| quietMs | No | ||
| evidence | No | ||
| timeoutMs | No | ||
| stopOnFail | No |