-
-
Notifications
You must be signed in to change notification settings - Fork 61
MCP Tools Editor Window #298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Update merged into this branch
var tools = UnityMcpPlugin.Instance.Tools;
if (tools != null)
{
foreach (var tool in tools.GetAllTools())
{
// Get Enabled state of a tool
var isEnabled = tools.IsToolEnabled(tool.Name);
// Set Enabled state of a tool
tools.SetToolEnabled(tool.Name, isEnabled);
}
}Need to doWhenever you can please add it @mainVar List
List item
Here is the code sample for reading the data from
|
UnityMcpPlugin.Instance.Tools via reflection, render the inputs/outputs/description per tool, use actual toggle state and summary stats, and added an outputs foldout in the tool template. The new ParseSchemaArguments helper now follows the JsonSchema access pattern from TestJsonSchema so descriptions/argument names come directly from the schema.
…improve disconnect handling in MainWindowEditor
…Murzak/Unity-MCP into feature/tools-editor-window
…Murzak/Unity-MCP into feature/tools-editor-window # Conflicts: # Unity-MCP-Plugin/Assets/root/Editor/MCPTools/MCPToolsWindow.cs
Unity-MCP-Plugin/Assets/root/Editor/UI/uxml/MCPToolsWindow.uxml
Outdated
Show resolved
Hide resolved
…layout consistency
…yles for smoother interactions
…l item visibility in MCP Tools window
…roved layout and user experience
…te management; update styles for filter label and empty list alignment in MCP Tools window
…agement in MCP Tools window
IvanMurzak
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces a new MCP Tools Editor Window that allows users to view, filter, and enable/disable MCP tools through a Unity Editor interface. The implementation adds a comprehensive UI with filtering capabilities, state persistence, and integration with the existing AI Game Developer window.
Key Changes
- New
McpToolsWindowEditorWindow with filtering (text search and enabled/disabled/all dropdown) and tool management UI - USS styling with animated toggle switches and foldout transitions for a polished user experience
- Integration with the main AI Connector window via a new "Tools Configuration" section showing tool statistics
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 18 comments.
Show a summary per file
| File | Description |
|---|---|
McpToolsWindow.cs |
Core implementation of the tools management window with filtering, UI binding, and tool state management |
McpToolsWindow.uxml |
Main window template defining the filter UI, stats display, and list view container |
ToolItem.uxml |
Individual tool item template with title, description, arguments, and toggle switch |
McpToolsWindow.uss |
Complete styling for the tools window including animations and toggle switch styling |
MainWindowEditor.CreateGUI.cs |
Integration adding "Tools Configuration" section with button to open McpToolsWindow and real-time tool statistics |
AiConnectorWindow.uxml |
Updated main window UXML to include new Tools Configuration section |
*.meta files |
Unity meta files for newly added assets |
Unity-MCP-Plugin/Assets/root/Editor/Scripts/UI/Window/McpToolsWindow.cs
Outdated
Show resolved
Hide resolved
Unity-MCP-Plugin/Assets/root/Editor/Scripts/UI/Window/McpToolsWindow.cs
Outdated
Show resolved
Hide resolved
Unity-MCP-Plugin/Assets/root/Editor/UI/uxml/McpToolsWindow.uxml
Outdated
Show resolved
Hide resolved
Unity-MCP-Plugin/Assets/root/Editor/Scripts/UI/Window/McpToolsWindow.cs
Outdated
Show resolved
Hide resolved
Unity-MCP-Plugin/Assets/root/Editor/Scripts/UI/Window/McpToolsWindow.cs
Outdated
Show resolved
Hide resolved
Unity-MCP-Plugin/Assets/root/Editor/Scripts/UI/Window/McpToolsWindow.cs
Outdated
Show resolved
Hide resolved
Unity-MCP-Plugin/Assets/root/Editor/Scripts/UI/Window/McpToolsWindow.cs
Outdated
Show resolved
Hide resolved
Unity-MCP-Plugin/Assets/root/Editor/Scripts/UI/Window/McpToolsWindow.cs
Outdated
Show resolved
Hide resolved
Unity-MCP-Plugin/Assets/root/Editor/Scripts/UI/Window/McpToolsWindow.cs
Outdated
Show resolved
Hide resolved
…g in MCP Tools window
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
IvanMurzak
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some changes required
Unity-MCP-Plugin/Assets/root/Editor/Scripts/UI/Window/MainWindowEditor.CreateGUI.cs
Outdated
Show resolved
Hide resolved
Unity-MCP-Plugin/Assets/root/Editor/Scripts/UI/Window/McpToolsWindow.cs
Outdated
Show resolved
Hide resolved
…Murzak/Unity-MCP into feature/tools-editor-window
IvanMurzak
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spotted one more important issue
Unity-MCP-Plugin/Assets/root/Editor/Scripts/UI/Window/MainWindowEditor.CreateGUI.cs
Outdated
Show resolved
Hide resolved
|
I added everything that was mentioned above. |
IvanMurzak
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job @mainVar !
Approved!




MCPTools:
Functional text filter and “Type” dropdown (Enabled / Disabled / All).
Saving the enabled/disabled state of tools via EditorPrefs (JSON).
Improved ToolItem template: classes are now added via AddToClassList / EnableInClassList.
Added extended mock tool data for testing.
Styles (USS): made compatible and safe changes; the toggle now has a consistent visual state and simple animation/movement (taking into account USS parser limitations).