batch_execute
Execute a list of editor commands sequentially, stopping on first error. Optionally roll back successful commands on failure for atomic multi-step edits.
Instructions
Execute a list of editor sub-commands in order, stopping on first error.
Each item must be {"command": "<plugin_command>", "params": {...}}.
Use the underlying plugin command names (e.g. create_node, set_property,
delete_node, attach_script), not the MCP tool names. Commands run
sequentially; execution stops at the first error. When undo is True
(default), any successful sub-commands are rolled back via the scene's
undo history if a later sub-command fails, producing atomic-on-failure
semantics.
Use this to compose multi-step edits (create node + set property +
attach script) into a single tool call. Rollback works for sub-commands
that modify the currently edited scene. batch_execute itself is not
allowed as a sub-command.
Scene paths are relative to the edited scene root (e.g. "/Main/Enemy"), NOT runtime "/root/..." paths. The example below assumes the scene root is named "Main" — substitute the actual root name.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| undo | No | Roll back succeeded sub-commands on failure. Default True. | |
| commands | Yes | List of `{"command": str, "params": dict}` items. | |
| session_id | No | Optional Godot session to target. Empty = active session. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||