playcal_loop
Safely run Unity or Godot editor commands by waiting for a ready editor, executing the action, settling again, and returning a single digest with verification and the first real error.
Instructions
run a Unity Editor command safely: wait until ready, run, wait again, one digest
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": "playcal_loop"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| diff | No | run --verify before the write too and report only what changed | |
| name | No | Editor command for `run` (see `unity command`) | |
| action | Yes | settle: wait for a ready Editor. run: settle, run, settle | |
| engine | No | godot: settle loads every script headless and reports parse errors as compile_error (default unity) | unity |
| expect | No | check on the --verify read (or the command result). PATH=VALUE, PATH!=VALUE, PATH~TEXT, or bare PATH (exists). * matches any list item: objects.*.name=Probe. Repeatable | |
| params | No | passed to the command unchanged; put them after --, e.g. run save_scene -- --name x | |
| verify | No | read command run after the write, e.g. "get_hierarchy --depth 1" | |
| compile | No | also run `unity recompile` and fail with the compile errors; the Editor says ready even when scripts don't build | |
| timeout | No | seconds to wait for a ready Editor (default 120) | |
| checkpoint | No | save files with playcal checkpoint before the write; on failure the digest says how to undo | |
| reload_wait | No | after the write, wait this long for a reload to start before trusting ready (default: 20 when the command says it needs a recompile, else 0) | |
| project_path | No | Unity project folder (needed when several Editors are open), or the Godot project folder |