Skip to content

Conversation

@markus-kusano
Copy link
Collaborator

This adds a simple schema and checks that the content returned by an elicitation handler is validated against the schema. Previously, we had no test coverage checking if the content was validated (i.e., we would see no test failures if we removed content validation against the schema).

The bulk of the actual validation logic is handled by the jsonschema library so adding comprehensive tests covering different schema-features is redundant, we simply need to see that some validation is happening.

See #625 for more details on the motivation of this change.

Fixes #625

This adds a simple schema and checks that the content returned by an
elicitation handler is validated against the schema. Previously, we had
no test coverage checking if the content was validated (i.e., we would
see no test failures if we removed content validation against the
schema).

The bulk of the actual validation logic is handled by the jsonschema
library so adding comprehensive tests covering different schema-features
is redundant, we simply need to see that some validation is happening.

See modelcontextprotocol#625 for more
details on the motivation of this change.
findleyr
findleyr previously approved these changes Dec 2, 2025
Copy link
Contributor

@findleyr findleyr left a comment

Choose a reason for hiding this comment

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

LGTM, with one suggestion (I'll reapprove if needed).

@markus-kusano markus-kusano merged commit 5928940 into modelcontextprotocol:main Dec 3, 2025
5 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.

SEP-1330: Elicitation Enum Schema Improvements

2 participants