Skip to content

Failed to validate tool f1e_GameObject_Modify: Error: tool parameters array type must have items #248810

Closed as not planned
@IvanMurzak

Description

@IvanMurzak

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: 1.100.0 (user setup)
  • OS Version: Windows_NT x64 10.0.26100

Steps to Reproduce:

  1. To have the MCP tool with name GameObject_Modify with the specified schema down below.
  2. Be in "Agent" mode and have "GPT-4.1" model.
  3. Type any prompt.

As you may notice from the json schema, each "array" has an "item" which describe the data model.
Same model GPT-4.1 works in Cursor with the same tool and the same schema. That is why I believe it is VS Code's issue.
I am using my Unity-MCP.

Json Schema

{
  "name": "GameObject_Modify",
  "description": "Modify GameObjects and/or attached component\u0027s field and properties.\r\nYou can modify multiple GameObjects at once. Just provide the same number of GameObject references and SerializedMember objects.",
  "inputSchema": {
    "type": "object",
    "properties": {
      "gameObjectDiffs": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "typeName": {
              "type": "string",
              "description": "Full type name. Eg: \u0027System.String\u0027, \u0027System.Int32\u0027, \u0027UnityEngine.Vector3\u0027, etc."
            },
            "name": {
              "type": "string"
            },
            "value": {
              "type": "object"
            },
            "fields": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "typeName": {
                    "type": "string",
                    "description": "Full type name. Eg: \u0027System.String\u0027, \u0027System.Int32\u0027, \u0027UnityEngine.Vector3\u0027, etc."
                  },
                  "name": {
                    "type": "string"
                  },
                  "value": {
                    "type": "object"
                  },
                  "fields": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    }
                  },
                  "props": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    }
                  }
                },
                "required": [
                  "typeName",
                  "name",
                  "value"
                ]
              }
            },
            "props": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "typeName": {
                    "type": "string",
                    "description": "Full type name. Eg: \u0027System.String\u0027, \u0027System.Int32\u0027, \u0027UnityEngine.Vector3\u0027, etc."
                  },
                  "name": {
                    "type": "string"
                  },
                  "value": {
                    "type": "object"
                  },
                  "fields": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    }
                  },
                  "props": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    }
                  }
                },
                "required": [
                  "typeName",
                  "name",
                  "value"
                ]
              }
            }
          },
          "required": [
            "typeName",
            "value"
          ]
        },
        "description": "Json Object with required readonly \u0027instanceID\u0027 and \u0027type\u0027 fields.\r\nEach field and property requires to have \u0027type\u0027 and \u0027name\u0027 fields to identify the exact modification target.\r\nFollow the object schema to specify what to change, ignore values that should not be modified. Keep the original data structure.\r\nAny unknown or wrong located fields and properties will be ignored.\r\nCheck the result of this command to see what was changed. The ignored fields and properties will be listed."
      },
      "gameObjectRefs": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "instanceID": {
              "type": "integer"
            },
            "path": {
              "type": "string"
            },
            "name": {
              "type": "string"
            }
          }
        },
        "description": "GameObject references. Used to specify GameObjects in opened Prefab or in a Scene.\r\nUse one of the following properties:\r\n1. \u0027instanceID\u0027 (int) - recommended. It finds the exact GameObject.\r\n2. \u0027path\u0027 (string) - finds GameObject by path. It may find a wrong GameObject.\r\n3. \u0027name\u0027 (string) - finds GameObject by name. It may find a wrong GameObject."
      }
    },
    "required": [
      "gameObjectDiffs",
      "gameObjectRefs"
    ]
  }
}

Metadata

Metadata

Assignees

Labels

info-neededIssue requires more information from poster

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions