execute_editor_menu_item
Executes a project-defined Unity Editor MenuItem by exact path, returns execution, settle, before/after state, duration, and synchronous errors, and blocks built-in menu roots.
Instructions
Execute a project-defined custom Unity Editor MenuItem by exact path and return correlated execution, settle, before/after state, duration, and synchronous Unity errors. Built-in Unity roots such as File, Edit, Assets, GameObject, Component, Window, and Help are blocked. Compilation/update activity, dirty scenes, and Play Mode fail closed unless the relevant explicit override is supplied.
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": {
"menuPath": "<menuPath>"
},
"name": "execute_editor_menu_item"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| menuPath | Yes | Exact project-defined MenuItem path | |
| timeoutMs | No | Maximum time for execution result and Editor settling | |
| waitForSettled | No | Wait for compilation and asset updates started by the menu item | |
| allowDirtyScene | No | Allow execution while the active scene has unsaved changes | |
| allowInPlayMode | No | Allow execution while Unity is in or entering Play Mode |