Skip to content

Conversation

@pcarleton
Copy link
Member

@pcarleton pcarleton commented Nov 21, 2025

Summary

Makes the mode field optional in ElicitRequestFormParams to maintain backwards compatibility with existing servers that don't include the mode field in form-based elicitation requests.

Motivation and Context

When URL elicitation was added (SEP-1036), the mode field became required to distinguish between form and URL elicitation modes. However, this broke backwards compatibility with existing servers that were sending elicitation requests without a mode field.

The spec already states:

For backwards compatibility, an empty capabilities object is equivalent to declaring support for form mode only

This change extends that backwards compatibility to the request schema itself - requests without a mode field should be treated as form mode.

How Has This Been Tested?

Tested with the MCP conformance test suite (tools-call-elicitation scenario). Before this change, the test failed with a schema validation error:

Invalid input: expected "form"

After applying this change (and the corresponding TypeScript SDK change to use z.literal('form').optional()), the test passes.

Breaking Changes

None - this is a backwards-compatible change. Servers can continue to either:

  1. Omit the mode field (treated as form mode)
  2. Explicitly set mode: "form"
  3. Set mode: "url" for URL-based elicitation

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

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

The generated schema.json and schema.mdx files have been updated by running npm run generate:schema.

pcarleton and others added 2 commits November 21, 2025 15:34
…lity

For backwards compatibility with servers that don't include the mode field
in form-based elicitation requests, mode is now optional and defaults to 'form'.

This aligns with the spec language stating that an empty elicitation capability
object is equivalent to declaring support for form mode only.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Clarify that servers MAY omit the mode field for form mode elicitation
requests, and clients MUST treat such requests as form mode.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@pcarleton pcarleton force-pushed the pcarleton/urle-type-backcompat branch from 33c2ccd to dd273a8 Compare November 21, 2025 15:40
@pcarleton pcarleton marked this pull request as ready for review November 21, 2025 15:42
@pcarleton pcarleton requested a review from a team as a code owner November 21, 2025 15:42
@pcarleton pcarleton added the rc-high-priority Related to an upcoming specification release and needs to be addressed with a high priority. label Nov 21, 2025
@pcarleton pcarleton moved this to In review in 2025-11-25 Implementation Nov 21, 2025
@pcarleton
Copy link
Member Author

@nbarbettini / @wdawson could you take a look at this?

@pcarleton
Copy link
Member Author

also @dend as sponsor (i'll need core-maintainer codeowners)

Copy link
Contributor

@nbarbettini nbarbettini left a comment

Choose a reason for hiding this comment

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

LGTM

@nbarbettini
Copy link
Contributor

@pcarleton @felixweinberger The TS SDK will need to be adjusted. I'll do a quick PR there after this schema change is merged.

@pcarleton pcarleton merged commit 970851e into main Nov 21, 2025
7 checks passed
@pcarleton pcarleton deleted the pcarleton/urle-type-backcompat branch November 21, 2025 18:08
@github-project-automation github-project-automation bot moved this from In review to Done in 2025-11-25 Implementation Nov 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rc-high-priority Related to an upcoming specification release and needs to be addressed with a high priority.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants