Skip to content

Conversation

@pbezglasny
Copy link
Contributor

@pbezglasny pbezglasny commented Nov 11, 2025

SEP-1330 introduced multiple select for enum for elicitation. But schema of example is differ from typescript schema definition.

In specification example

"maxItems": 2,
"items": {
"oneOf": [
{ "const": "#FF0000", "title": "Red" },
{ "const": "#00FF00", "title": "Green" },
{ "const": "#0000FF", "title": "Blue" }
]

used oneOf field name, while in typescript schema definition it's anyOf

* Schema for array items with enum options and display labels.
*/
items: {
/**
* Array of enum options with values and display labels.
*/
anyOf: Array<{
/**
* The constant enum value.
*/
const: string;
/**
* Display title for this option.

This PR update example to match with schema specification.

How Has This Been Tested?

npm run check

Breaking Changes

No, updated only example in docs

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

Copilot AI review requested due to automatic review settings November 11, 2025 18:39
@pbezglasny pbezglasny requested a review from a team as a code owner November 11, 2025 18:39
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a documentation inconsistency where the multi-select enum example incorrectly used oneOf instead of anyOf to match the actual TypeScript and JSON schema definitions.

  • Corrects the multi-select enum schema example to use anyOf instead of oneOf

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pbezglasny pbezglasny changed the title Fix elicitation enum schema multiselect example docs: fix elicitation enum schema multiselect example Nov 11, 2025
Copy link
Member

@cliffhall cliffhall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👍

@cliffhall cliffhall enabled auto-merge November 17, 2025 15:08
@cliffhall cliffhall merged commit 55e3209 into modelcontextprotocol:main Nov 17, 2025
2 checks passed
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.

4 participants