Skip to content

Add schemas for form-based elicitation#1020

Merged
Kehrlann merged 4 commits into
mainfrom
dgarnier/enum-schema-elicitation
Jun 11, 2026
Merged

Add schemas for form-based elicitation#1020
Kehrlann merged 4 commits into
mainfrom
dgarnier/enum-schema-elicitation

Conversation

@Kehrlann

Copy link
Copy Markdown
Contributor

Adds builder classes to all new enum schema types introduced for form-based elicitation (SEP-1330)
ConformanceServlet is updated to use the new builders and serves as a reference.

Closes #691

@Kehrlann Kehrlann requested a review from chemicL June 10, 2026 22:02
@Kehrlann Kehrlann added enhancement New feature or request area/client area/server P1 Significant bug affecting many users, highly requested feature labels Jun 10, 2026
@Kehrlann Kehrlann force-pushed the dgarnier/enum-schema-elicitation branch from f4ef858 to 6ed6c76 Compare June 10, 2026 22:18

@chemicL chemicL left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks! I left a few comments - they apply to all occurrences of a given pattern in the new code, I didn't repeat it in all the new types.

Comment thread mcp-core/src/main/java/io/modelcontextprotocol/spec/McpSchema.java Outdated
* @param defaultValue Optional default value
* @deprecated Use {@link TitledSingleSelectEnumSchema} instead
*/
@Deprecated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Does it make sense a new API that is deprecated on day 1?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think so, if we plan to introduce it.
Spring Boot did this for Jackson 2 support.

Otherwise, we could just skip this altogether since users can do Map<String, Object>

Comment thread mcp-core/src/main/java/io/modelcontextprotocol/spec/McpSchema.java Outdated
}

public Builder enumValue(String enumValue) {
if (this.enumValues == null) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I noticed we don't check whether enumValue itself is null. Should we?

Comment thread mcp-core/src/main/java/io/modelcontextprotocol/spec/McpSchema.java Outdated
Comment thread mcp-core/src/main/java/io/modelcontextprotocol/spec/McpSchema.java Outdated
Comment thread mcp-core/src/main/java/io/modelcontextprotocol/spec/McpSchema.java
@Kehrlann Kehrlann requested a review from chemicL June 11, 2026 09:00

@chemicL chemicL left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, looks excellent!

Kehrlann added 4 commits June 11, 2026 11:11
Closes #691

Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
…tation

Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
@Kehrlann Kehrlann force-pushed the dgarnier/enum-schema-elicitation branch from fb70217 to 9dbdc0d Compare June 11, 2026 09:11
@Kehrlann Kehrlann merged commit fe82ad5 into main Jun 11, 2026
24 checks passed
@Kehrlann Kehrlann deleted the dgarnier/enum-schema-elicitation branch June 11, 2026 09:16
@Kehrlann Kehrlann changed the title Add enum schemas for form-based elicitation matching SEP-1330 Add schemas for form-based elicitation Jun 11, 2026
@chemicL chemicL added this to the 2.0.0 milestone Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/client area/server enhancement New feature or request P1 Significant bug affecting many users, highly requested feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SEP-1330: Introduce Elicitation Enum Schemas

2 participants