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\""
  }
]

Comment From: jamesward

This works if wrapped:

data class EmployeeSkills(val skills: Set<String>)

    @McpTool(description = "the list of all possible employee skills")
    fun getSkills(): EmployeeSkills =
        EmployeeSkills(
            SampleData.employees.flatMap { it.skills }.toSet()
        )

Comment From: jamesward

See: https://github.com/modelcontextprotocol/java-sdk/issues/550