Skip to content

fix(SEP-2322): Explicitly support extending ResultType#2773

Merged
CaitieM20 merged 4 commits into
modelcontextprotocol:mainfrom
LucaButBoring:fix/resultType-extensibility
May 28, 2026
Merged

fix(SEP-2322): Explicitly support extending ResultType#2773
CaitieM20 merged 4 commits into
modelcontextprotocol:mainfrom
LucaButBoring:fix/resultType-extensibility

Conversation

@LucaButBoring

@LucaButBoring LucaButBoring commented May 22, 2026

Copy link
Copy Markdown
Contributor

Explicitly declares support for extending the ResultType type so that extensions can extend it with their own extended set of extended values.

ResultType values unrecognized by the client are considered invalid protocol responses (fail-closed).

This modifies #2322 and #2663.

Motivation and Context

This change makes it clear to SDK maintainers that the resultType field may be extended by extensions. This is particularly relevant for the Tasks extension.

In particular, we want to avoid a situation where an extension (like Tasks) requires extending resultType but an SDK has implemented that discriminated union in a way that makes extensions impossible without introducing breaking changes to SDK consumers.

How Has This Been Tested?

N/A

Breaking Changes

N/A

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

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

@LucaButBoring LucaButBoring requested review from a team as code owners May 22, 2026 20:12
@kurtisvg kurtisvg requested a review from CaitieM20 May 22, 2026 22:52
@PederHP

PederHP commented May 23, 2026

Copy link
Copy Markdown
Member

LGTM - seems the sensible solution to extensibility here.

Comment thread seps/2322-MRTR.md Outdated
Comment thread docs/specification/draft/basic/index.mdx Outdated

@CaitieM20 CaitieM20 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

requested some spec wording changes for clarity

@LucaButBoring LucaButBoring force-pushed the fix/resultType-extensibility branch from 532952e to 93c027f Compare May 27, 2026 17:55
@LucaButBoring

Copy link
Copy Markdown
Contributor Author

Updated and rebased

@markdroth

Copy link
Copy Markdown
Contributor

Looks good to me!

@CaitieM20 CaitieM20 merged commit d632389 into modelcontextprotocol:main May 28, 2026
5 checks passed
LucaButBoring added a commit to modelcontextprotocol/ext-tasks that referenced this pull request May 28, 2026
LucaButBoring added a commit to modelcontextprotocol/agents-wg that referenced this pull request May 28, 2026
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.

4 participants