Re-vendor 2026-07-28 schema at spec ead35b59 (SubscriptionsListenResult)

Merged
MA
4mo ago
+124-15

Re-vendors schema/draft/schema.json at spec commit ead35b59 to pick up modelcontextprotocol/modelcontextprotocol#2953, the only schema/draft/ change since the previous vendor pin (2852f30e, set by #2912). Spec main is 20 commits past 2ffc3fa2 (#2953's merge) with no further schema/draft/ changes, so this brings the vendored schema fully up to date.

The schema diff is purely additive: SubscriptionsListenResult and SubscriptionsListenResultMeta are added to $defs, and SubscriptionsListenResult joins the ServerResult union.

Motivation and Context

Part of #2901. The subscriptions/listen runtime work needs the result type to exist before it can land; today the lowlevel on_subscriptions_listen slot is typed to return EmptyResult, which is no longer the spec-correct shape post-#2953.

How Has This Been Tested?

gen_surface_types.py --check, pyright, ruff, and ./scripts/test (full suite, 100% coverage, strict-no-cover clean).

Breaking Changes

None for users — SubscriptionsListenResult is a new type and nothing previously consumed subscriptions/listen results. The lowlevel on_subscriptions_listen callback's return type changes from EmptyResult to SubscriptionsListenResult, but per the design that handler is registered by the entry-side router rather than user code, and there is no runtime caller yet.

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

  • SubscriptionsListenResultMeta is added to OPEN_CLASSES so the generated wire model preserves arbitrary _meta keys, matching NotificationMetaObject (both are MetaObject extensions; neither carries additionalProperties in the upstream JSON Schema, so the codegen default would have closed them).
  • In the monolith the new result follows the existing pattern: _meta stays the lenient dict[str, Any] inherited from Result (so SubscriptionsListenResultMeta is SKIP-listed in tests/types/test_parity.py alongside the other *MetaObject types), and the class sits in the ServerResult union immediately before InputRequiredResult, which must remain last.
  • Conformance gap: the conformance suite at b18aa918 (this repo's pin and conformance main HEAD) is itself pinned to spec f817239f — pre-#2953 — and has no scenario asserting the subscriptions/listen result body. Its existing subscriptions/listen checks in server/stateless.ts only inspect notification frames on the stream. I'll raise a conformance issue to bump the spec-types pin and add a result-shape check; this PR does not change conformance behaviour either way (the new type is not yet emitted by any runtime path).