execute_menu_item
Executes a Unity Editor menu item by its path (e.g., ‘File/Save’, ‘Edit/Undo’), including project-defined menus. Menu items that can reload the script domain (such as Assets/Refresh) are queued and the response returns before they run,
分類: コード
| 名前 | 型 | 必須 | 既定値 | 説明 |
|---|---|---|---|---|
menu_path |
string | 必須 | Full path to the menu item (e.g., ‘File/Save Scene’, ‘GameObject/Create Empty’) |
呼び出しの例
Section titled “呼び出しの例”必須の引数だけを入れています。ほかは必要に応じて足してください。
{ "name": "execute_menu_item", "arguments": { "menu_path": "…" }}SuperSave モードでは
Section titled “SuperSave モードでは”Unity を NANORA_MCP_SUPERSAVE=1 で起動したときは、メタツール execute から {"tool": "execute_menu_item", "args": { … }} の形で呼びます。SuperSave モードを参照。
Assets/NanoraUnityMCP/Editor/Tools/ExecuteMenuItemTool.cs(版 1.2.1)から生成しています。説明文はツール定義のまま(英語)です。AI クライアントは tools/list で同じスキーマを受け取ります。