SEP: `interceptor/invoke` response examples omit the required `type`, `interceptor` and `phase` fields

Open Beginner friendly
#50 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
85/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
csharp, go, python
Domain
documentation

Research direction

Open docs/sep.md: the required fields are defined in the ValidationResult and MutationResult interfaces around lines 327-355 and 379-391, while the two interceptor/invoke response examples are around lines 602-631 and 663-685. Compare each example against its interface and add the missing interceptor, type and phase fields to both. Done when the examples show the same required common fields as the interfaces; the C#, Python and Go SDK references in the issue explain why the mismatch matters.

Written by the indexing model from the issue text.

Description

The ValidationResult and MutationResult interfaces mark interceptor, type and phase as required (validation, mutation). The interceptor/invoke response examples leave all three out and show only the type-specific fields (validation response, mutation response).

Effect. An interceptor server written from the examples does not interoperate with invokers written from the interfaces:

  • C# uses type as the polymorphic discriminator for the result (InterceptorResult.cs).
  • Python (#30) picks the result model from type and raises a validation error when it is missing.

Go is a third shape today: InvokeResult carries the common fields at the top level but nests the type-specific ones under validation / mutation (wire.go).

Proposal. Add interceptor, type and phase to both response examples so that they match the interfaces. If the intent is instead that these fields are optional on the wire, the interfaces should say so and invokers should fall back to the type declared in interceptors/list.

A shared response fixture in the conformance work (#20, #31) would keep the SDKs from drifting here again.

Found while reviewing #30.

🤖 Generated with Claude Code

Dominant language
C#
Stars
24
Forks
16
Avg merge
3m
Merged PRs (30d)
1

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from modelcontextprotocol/experimental-ext-interceptors

All issues in modelcontextprotocol/experimental-ext-interceptors

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.