spring-projects / spring-projects/spring-ai
Invalid Output Schema for Tools Returning Collections
Open
Nobody has claimed this yet.
status: waiting-for-triage
- Dominant language
- Java
- Stars
- 9.5k
- Forks
- 2.9k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 6
Description
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\""
}
]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the @McpTool entry point using the Kotlin getSkills() reproducer in the issue, then trace how its List return type becomes the MCP outputSchema. Run the example with MCP Inspector and verify that the generated schema is accepted for a collection return value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin, spring
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100