Uh oh!
There was an error while loading. Please reload this page.
feat(SEP-1330): Elicitation Enum Schema Improvements Implementation - #537
feat(SEP-1330): Elicitation Enum Schema Improvements Implementation#537pbezglasny wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR implements SEP-1330 Elicitation Enum Schema Improvements, introducing a comprehensive schema system for single and multi-select enums with optional human-readable titles. The implementation maintains backward compatibility through a LegacyEnumSchema while providing a new builder-based API for constructing enum schemas compliant with the updated MCP specification.
Key Changes:
- Introduced four new enum schema variants:
UntitledSingleSelectEnumSchema,TitledSingleSelectEnumSchema,UntitledMultiSelectEnumSchema, andTitledMultiSelectEnumSchema - Added
EnumSchemaBuilderwith fluent API for configuring enum schemas with support for single/multi-select modes, titles, descriptions, and default values - Enhanced schema inference in
from_json_schemato automatically detect and transform enum fields from JSON schemas, including reference resolution and property normalization
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
examples/servers/src/elicitation_stdio.rs | Enhanced elicitation example with UserType enum demonstrating titled single-select functionality; updated error handling and output streams |
crates/rmcp/src/model/elicitation_schema.rs | Core implementation of new enum schema types, builder pattern, and schema inference logic with reference resolution and property normalization |
crates/rmcp/tests/test_elicitation.rs | Updated test to use new EnumSchema::builder() API instead of direct vector-based enum creation |
crates/rmcp/tests/test_message_schema/server_json_rpc_message_schema.json | JSON schema definitions for new enum schema variants, supporting both current and legacy formats |
crates/rmcp/tests/test_message_schema/server_json_rpc_message_schema_current.json | Updated current schema with new enum type definitions matching the implementation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 8 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
c5f342a to
faeba48Compare
Implemented #524 Elicitation Enum Schema Improvements and Standards Compliance.
Motivation and Context
SEP-1330: Elicitation Enum Schema Improvements introduce new schema for enum type for elicitation. This PR implements its specifications: single/multi select options with/without titles.
Details:
This code will serialized to specification format.
How Has This Been Tested?
Tested with mcpinspector. It correctly understands single select option for enum. But does not work with multi-select options.
Breaking Changes
Yes. By default elicitation
Types of changes
Checklist
Additional context
Closes#524