Skip to content

schema(draft): align subscriptions/listen with envelope and _meta naming conventions - #3006

Closed
JaynouOliver wants to merge 1 commit into
modelcontextprotocol:mainfrom
JaynouOliver:subscriptions-listen-schema-consistency
Closed

schema(draft): align subscriptions/listen with envelope and _meta naming conventions#3006
JaynouOliver wants to merge 1 commit into
modelcontextprotocol:mainfrom
JaynouOliver:subscriptions-listen-schema-consistency

Conversation

@JaynouOliver

Copy link
Copy Markdown
Contributor

Fixes #2989

Summary

Two consistency fixes in the draft schema for the subscriptions/listen types added in #2953, aligning them with the conventions established by the surrounding code:

  1. Rename SubscriptionsListenResultMetaSubscriptionsListenResultMetaObject. The other _meta-contents types (MetaObject, RequestMetaObject, NotificationMetaObject from Align draft schema with spec docs (subscriptionId, HeaderMismatch, notification directions) #2889) all use the MetaObject suffix; this was the one divergence.
  2. Add the missing SubscriptionsListenResultResponse envelope. Every other request method has a dedicated *ResultResponse envelope (CallToolResultResponse, DiscoverResultResponse, ReadResourceResultResponse, etc.); subscriptions/listen was the only one without. Also adds a listen-closed-response.json example, which validates against the new envelope.

Since these are draft-only (unreleased) editorial changes with no wire-format impact, no SEP should be needed. If either half turns out to be intentional as-is (per the questions in #2989), happy to drop that half — the two changes are independent.

schema.json and docs/specification/draft/schema.mdx are regenerated via npm run generate:schema.

Verification

npm run check   # passes: schema TS/JSON/examples/MDX, docs, SEPs

…ing conventions

Fixes modelcontextprotocol#2989

Rename SubscriptionsListenResultMeta to SubscriptionsListenResultMetaObject
to match the MetaObject-suffix convention used by MetaObject,
RequestMetaObject, and NotificationMetaObject, and add the
SubscriptionsListenResultResponse envelope so subscriptions/listen matches
the per-method *ResultResponse pattern used by the other nine request
methods. Adds a listen-closed-response.json example validated against the
new envelope. schema.json and schema.mdx are regenerated.
@JaynouOliver
JaynouOliver requested a review from a team as a code owner July 3, 2026 12:18
@paulbalandan

Copy link
Copy Markdown

Thanks for picking this up, I wasn't expecting a PR when I filed #2989.

The rename half seems uncontroversial to me. MetaObject, RequestMetaObject and NotificationMetaObject all carry the suffix and this one doesn't.

The envelope is the part I'd really like a maintainer to weigh in on. SubscriptionsListenResult is the only result type without a *ResultResponse, and since codegen and schema validation key off those envelopes, every implementation ends up improvising something slightly different. Either answer works for me. It's the open question that's awkward to build against.

Since the two changes are independent, would it be worth landing the rename on its own if the envelope needs more discussion?

@claude

claude Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Maintainers asked to fast-track this change, and this fork branch could not be updated from the current session. A rebased replacement PR, #3158, now carries your original commit with authorship preserved, extended to cover the released 2026-07-28 schema as well. Thank you for the contribution, @JaynouOliver.


Generated by Claude Code

@localden

Copy link
Copy Markdown
Contributor

Thank you for the fix, @JaynouOliver - this is merged now (with authorship attribution preserved in commits).

@localden localden closed this Jul 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.

subscriptions/listen response: no dedicated *ResultResponse envelope, and SubscriptionsListenResultMeta suffix

3 participants