Class ManageMenuItem
Supports execute, list, exists, and refresh operations with caching and search capabilities.
Inherited Members
Namespace: Unity.AI.MCP.Editor.Tools
Assembly: Unity.AI.MCP.Editor.dll
Syntax
public static class ManageMenuItem
Fields
Description
Description of the ManageMenuItem tool functionality and parameters.
Declaration
public const string Description = "Manages Unity Editor menu items (execute/list/exists/refresh),\n If you're not sure what menu item to use, use the 'list' action\n to find it before using 'execute'.\n\nArgs:\n Action: Operation to perform (Execute, List, Exists, Refresh).\n MenuPath: Menu path for execute/exists actions (e.g., 'File/Save Project').\n Search: Filter string for list action (case-insensitive).\n Refresh: Force refresh menu cache before operation.\n\nReturns:\n Dictionary with operation results ('success', 'message', 'data')."
Field Value
| Type | Description |
|---|---|
| string |
Title
Display title for the ManageMenuItem tool.
Declaration
public const string Title = "Manage Unity Editor menu items (execute/list/exists/refresh)"
Field Value
| Type | Description |
|---|---|
| string |
Methods
HandleCommand(ManageMenuItemParams)
Execute the tool with strongly-typed parameters.
Declaration
[McpTool("Unity.ManageMenuItem", "Manages Unity Editor menu items (execute/list/exists/refresh),\n If you're not sure what menu item to use, use the 'list' action\n to find it before using 'execute'.\n\nArgs:\n Action: Operation to perform (Execute, List, Exists, Refresh).\n MenuPath: Menu path for execute/exists actions (e.g., 'File/Save Project').\n Search: Filter string for list action (case-insensitive).\n Refresh: Force refresh menu cache before operation.\n\nReturns:\n Dictionary with operation results ('success', 'message', 'data').", "Manage Unity Editor menu items (execute/list/exists/refresh)", null, Groups = new string[] { "core", "editor" })]
public static object HandleCommand(ManageMenuItemParams parameters)
Parameters
| Type | Name | Description |
|---|---|---|
| ManageMenuItemParams | parameters | The parameters specifying the menu action and related settings. |
Returns
| Type | Description |
|---|---|
| object | A response object containing success status, message, and optional data. |