Meta¶
1 tool for execute_batch, several tool calls in one.
Back to the index.
execute_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). When stop_on_error trips on an error, cancel_transaction closes it instead and rolls back what the run had recorded, items reported ok included: transaction_rolled_back says whether it did. Default false. |
Returns: { success: bool, results: [{index: int, command_type: string, ok: bool, payload?: any, error?: string}], stopped_early: bool, transaction_rolled_back?: bool (with transaction, when stop_on_error tripped) }