Meta¶
1 tools. Back to the index.
batch¶
Destructive.
Run SEVERAL commands back-to-back inside the SAME game-thread pass, with no intermediate MCP round-trips -- the way to cut N calls to 1 when you are authoring in bulk. Any command the bridge dispatches can go in the list. By default every item runs even if an earlier one failed, and each result is reported individually; set stop_on_error to abort at the first failure, and transaction to make the whole run a single undo step.
| Parameter | Type | Required | Description |
|---|---|---|---|
commands |
array | yes | [{command_type: string, params?: object}, ...] (required, non-empty) |
stop_on_error |
boolean | no | Stop after the first failing sub-command (default false) |
transaction |
boolean | no | Wrap the whole run in one undo transaction, so a single undo reverts all of it (begin_transaction / end_transaction, or cancel_transaction instead when stop_on_error tripped on an error). Default false. |
Returns: { success: bool, results: [{index: int, command_type: string, ok: bool, payload?: any, error?: string}], stopped_early: bool }