Skip to content

Conversation

@mainVar
Copy link
Collaborator

@mainVar mainVar commented Nov 2, 2025

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).

@mainVar mainVar requested a review from IvanMurzak November 2, 2025 19:09
@mainVar mainVar self-assigned this Nov 2, 2025
@IvanMurzak IvanMurzak added the enhancement New feature or request label Nov 2, 2025
@IvanMurzak
Copy link
Owner

Update merged into this branch

  • Data save and load from json config file is added
  • Enabled / Disabled tool data is provided.
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 do

Whenever you can please add it @mainVar

List

  • Read tools and filter them by
    • Title substring
    • Enabled status
  • Show amount of filtered and total tools
image

List item

  • Read tool Title and set the value to UI
  • Read tool Name (id) and set the value to UI
  • Read tool Description and set the value to UI
  • Read Enabled state and set the value to UI
  • Set Enabled state based on the toggle switch by user click
  • Read list of input arguments and show the data
  • Read list of outputs and show the data (it should look the same as input arguments, just instead of input arguments it should outputs
image

Here is the code sample for reading the data from tool

Read input arguments

// Get input arguments list
if (tool.InputSchema?.AsObject().TryGetPropertyValue(JsonSchema.Properties, out var inputProperties) == true)
{
    // if we get here, it means that tool has input properties

    foreach (var inputItem in inputProperties!.AsObject())
    {
        // inputName - name of the input property
        var inputName = inputItem.Key;

        // hasDescription - indicates if the description property exists
        // inputDescription - contains the actual description value if it exists
        var hasDescription = inputItem.Value?.AsObject().TryGetPropertyValue(JsonSchema.Description, out var inputDescription);
    }
}

Read outputs

// Get output items list
if (tool.OutputSchema?.AsObject().TryGetPropertyValue(JsonSchema.Properties, out var outputProperties) == true)
{
    // if we get here, it means that tool has output properties

    foreach (var outputItem in outputProperties!.AsObject())
    {
        // outputName - name of the output property
        var outputName = outputItem.Key;

        // hasDescription - indicates if the description property exists
        // outputDescription - contains the actual description value if it exists
        var hasDescription = outputItem.Value?.AsObject().TryGetPropertyValue(JsonSchema.Description, out var outputDescription);
    }
}

IvanMurzak and others added 15 commits November 15, 2025 00:49
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

# Conflicts:
#	Unity-MCP-Plugin/Assets/root/Editor/MCPTools/MCPToolsWindow.cs
@mainVar
Copy link
Collaborator Author

mainVar commented Nov 28, 2025

image image Update all and add in main window

IvanMurzak
IvanMurzak previously approved these changes Nov 29, 2025
Copy link
Owner

@IvanMurzak IvanMurzak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@IvanMurzak IvanMurzak requested a review from Copilot November 29, 2025 14:17
Copilot finished reviewing on behalf of IvanMurzak November 29, 2025 14:21
Copy link
Contributor

Copilot AI left a 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 McpToolsWindow EditorWindow 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

Copy link
Owner

@IvanMurzak IvanMurzak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some changes required

Copy link
Owner

@IvanMurzak IvanMurzak left a 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

@mainVar
Copy link
Collaborator Author

mainVar commented Nov 30, 2025

I added everything that was mentioned above.

@mainVar mainVar requested a review from IvanMurzak November 30, 2025 13:48
Copy link
Owner

@IvanMurzak IvanMurzak left a 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!

@IvanMurzak IvanMurzak merged commit a5ac1de into main Nov 30, 2025
37 checks passed
@IvanMurzak IvanMurzak deleted the feature/tools-editor-window branch November 30, 2025 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants