Skip to content

[Server] Fix variadic enum parameters declaring their items as objects - #735

Open
skybleak333 wants to merge 1 commit into
modelcontextprotocol:mainfrom
skybleak333:schema-variadic-enum-items
Open

skybleak333 wants to merge 1 commit into
modelcontextprotocol:mainfrom
skybleak333:schema-variadic-enum-items

Conversation

@skybleak333

@skybleak333 skybleak333 commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

A variadic enum parameter like Color ...$colors was advertised as {"type": "array", "items": {"type": "object"}}, so {"colors": ["red", "blue"]} got -32602 Expected object, but received string and no input could reach the handler. The items now list the enum's values, like for a single enum parameter, so the call validates and the handler gets the enum cases.

Found, fixed and written up with Claude Code.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant