fix: Support form and url fields in Elicitation capability per 2025-11-25 spec by rhtnr · Pull Request #731 · modelcontextprotocol/java-sdk
…1-25 spec
Update the ClientCapabilities.Elicitation record to accept optional "form"
and "url" fields as defined in the MCP 2025-11-25 specification.
Previously, deserializing an InitializeRequest with
`{"capabilities":{"elicitation":{"form":{}}}}` would fail with
UnrecognizedPropertyException because the Elicitation record was empty.
Changes:
- Add nested Form and Url marker records to Elicitation
- Add no-arg constructor for backward compatibility (serializes to {})
- Add elicitation(boolean form, boolean url) builder method
- Add comprehensive tests for deserialization and serialization
Fixes modelcontextprotocol#724
tzolov pushed a commit that referenced this pull request
Jan 8, 2026…1-25 spec (#731) Update the ClientCapabilities.Elicitation record to accept optional "form" and "url" fields as defined in the MCP 2025-11-25 specification. Previously, deserializing an InitializeRequest with `{"capabilities":{"elicitation":{"form":{}}}}` would fail with UnrecognizedPropertyException because the Elicitation record was empty. Changes: - Add nested Form and Url marker records to Elicitation - Add no-arg constructor for backward compatibility (serializes to {}) - Add elicitation(boolean form, boolean url) builder method - Add comprehensive tests for deserialization and serialization Fixes #724
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