Skip to content

There are a large number of parameters of invalid types #42

Closed

Description

@mediaplay331

When Cursor calls the MCP tool and uses the script generated by Claude 3.7 to control the Unity editor, a large number of errors occur:

Invalid type for parameter 'color' in tool set_material

Invalid type for parameter 'scale' in tool modify_object

Invalid type for parameter 'set_parent' in tool modify_object

Invalid type for parameter 'material_name' in tool set_material

Invalid type for parameter 'set_property' in tool modify_object

Invalid type for parameter 'type' in tool get_asset_list

Invalid type for parameter 'location' in tool modify_object

Additionally, there are issues reported by the console. Is this a problem with the Cursor?

ExecuteMenuItem failed because there is no menu named 'Script/CreateRoadMaterials/Create All Materials'
UnityEditor.EditorApplication:ExecuteMenuItem (string)
UnityMCP.Editor.Commands.EditorControlHandler:HandleExecuteCommand (Newtonsoft.Json.Linq.JObject) (at Library/PackageCache/com.justinpbarnett.unity-mcp@42c7f8e7df0f/Editor/Commands/EditorControlHandler.cs:120)
UnityMCP.Editor.Commands.EditorControlHandler:HandleEditorControl (Newtonsoft.Json.Linq.JObject) (at Library/PackageCache/com.justinpbarnett.unity-mcp@42c7f8e7df0f/Editor/Commands/EditorControlHandler.cs:33)
UnityMCP.Editor.UnityMCPBridge:ExecuteCommand (UnityMCP.Editor.Models.Command) (at Library/PackageCache/com.justinpbarnett.unity-mcp@42c7f8e7df0f/Editor/UnityMCPBridge.cs:308)
UnityMCP.Editor.UnityMCPBridge:ProcessCommands () (at Library/PackageCache/com.justinpbarnett.unity-mcp@42c7f8e7df0f/Editor/UnityMCPBridge.cs:203)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()

Activity

  1. justinpbarnett commented on Mar 24, 2025

    @justinpbarnett
    Contributor

    Same issue as #36, will bump priority to fix.

  2. added
    duplicate
    on Mar 24, 2025
  3. justinpbarnett commented on Apr 1, 2025

    @justinpbarnett
    Contributor

    Fixed in PR #68

    Was due to cursor not accepting Optional, Union, or Any types

  4. linked a pull request that will close this issueFeature/tool overhaul #68on Apr 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicate

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions