Skip to content

Invalid Output Schema for Tools Returning Collections #4373

@jamesward

Description

@jamesward

Spring AI 1.1.0-M1

    @McpTool(description = "the list of all possible employee skills")
    fun getSkills(): List<String> =
        listOf("kotlin")

Error in MCP Inspector:

[
  {
    "received": "array",
    "code": "invalid_literal",
    "expected": "object",
    "path": [
      "tools",
      0,
      "outputSchema",
      "type"
    ],
    "message": "Invalid literal value, expected \"object\""
  }
]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions