Skip to content

Implement SEP-2200: Clarify tool result content visibility #2193

Description

@felixweinberger

This is a tracking issue for implementation of SEP-2200.

Activity

  1. mattzcarey commented on May 29, 2026

    @mattzcarey
    Member

    Status — SEP-2200 (Clarify tool result content visibility)

    Track: C — independent, starts now.
    Spec: SEP-2200 PR was closed, but the normative content still landed in docs/specification/draft/server/tools.mdx via other commits. The spec page treats this as a real release-1 SEP.

    What's done

    • Nothing in main enforcing the new rules. packages/core/src/types/spec.types.ts currently has the old prose (isError: true → "any errors that originate from the tool SHOULD be reported inside the result object").

    Outstanding (acceptance criteria, summary)

    • R-2200-4 (wire): Tool that returns structuredContent SHOULD also return a content representation of the same information. Remove the SDK's auto-JSON-stringify of structuredContent into content (the old inspector behavior from change step name #1089).
    • R-2200-5 (wire): When outputSchema is defined AND result is not an error, server MUST provide structuredContent conforming to the schema. The "not an error" qualifier is new — if isError=true with no/non-conforming structuredContent, SDK MUST NOT reject.
    • R-2200-6 (sdk): Clients SHOULD NOT validate structuredContent against outputSchema when isError=true. (Today the client validator likely throws on outputSchema mismatch regardless of isError.)
    • R-2200-1 (guidance): Clients SHOULD NOT forward both content and structuredContent verbatim to the model.
    • R-2200-7 (guidance): When both present they SHOULD be semantically equivalent.
    • R-2200-8 (guidance): Conversational/agentic clients SHOULD use content, fall back to structuredContent if empty.
    • R-2200-9 (guidance): Programmatic/typed clients SHOULD prefer structuredContent.
    • R-2200-10 (guidance): isError=true → error message in content; structuredContent MAY be omitted.

    Suggested first PR

    1. Lift the "auto-stringify structuredContent into content" branch in the SDK helper and replace it with explicit caller behavior.
    2. In the client validator, gate outputSchema validation on !result.isError.
    3. Update JSDoc on CallToolResult.structuredContent to reference the new prose.

    Coordination

  2. self-assigned this
    on May 29, 2026
  3. norika1207-lab commented on Jun 2, 2026

    @norika1207-lab
  4. mattzcarey commented on Jun 9, 2026

    @mattzcarey
    Member

    Closing: SEP-2200 was declined — the spec PR (modelcontextprotocol/modelcontextprotocol#2200) was closed unmerged on 2026-05-25 after the Core Maintainer vote was re-run, with the stated preference to instead fix the underlying tools/call interface with polymorphic return types in a future spec revision. The draft spec contains no visibility language to implement (the adjacent structured-content guidance is covered by SEP-2106 / #2249). If a successor SEP lands, it should get its own tracking issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions