Repository navigation
Keep enum values in 2025-06-18 elicitation requests - #10952
Merged
tim-smart merged 5 commits intoNov 27, 2026
Merged
Conversation
🦋 Changeset detectedLatest commit: d13fb69 The changes in this PR will be included in the next version bump. This PR includes changesets to release 40 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
Bundle Size AnalysisGenerated from PR build output; treat the content below as untrusted.
|
Merged
This branch is waiting to be deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is AI-generated; I don't have strong opinions on the API or developer experience and am glad to take whatever shape you prefer, but I do need the functionality.
Problem
On
2025-06-18, an elicitation request whose schema has an enum property loses the enum. The client receives a plain string field, so the user sees a text box instead of a choice.The
2025-06-18requested-schema properties areSchema.Union([StringSchema, NumberSchema, BooleanSchema, EnumSchema]). An enum property ({ type: "string", enum, enumNames }) also matchesStringSchema, which comes first. The union takes it as a string schema, andenum/enumNamesare dropped on the way through.The same problem on
2025-11-25(#8063) was fixed in #7265. The2025-06-18schema still has the old order.Change
EnumSchemais tried first. One line, plus a comment saying why the order matters.Tests
McpProtocol.test.tsgains "preserves enum properties in elicitation schemas" underMCP v2025-06-18 schema. It decodes and JSON-encodes anelicitation/createpayload with an enum property and a plain string property, verifyingenumandenumNamessurvive while the plain string property is unchanged.Closes EFF-4378