Repository navigation
Implement SEP-2200: Clarify tool result content visibility #2193
Copy link
Copy link
Closed
Description
Activity
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 indocs/specification/draft/server/tools.mdxvia other commits. The spec page treats this as a real release-1 SEP.What's done
- Nothing in
mainenforcing the new rules.packages/core/src/types/spec.types.tscurrently 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
structuredContentSHOULD also return acontentrepresentation of the same information. Remove the SDK's auto-JSON-stringify ofstructuredContentintocontent(the old inspector behavior from change step name #1089). - R-2200-5 (wire): When
outputSchemais defined AND result is not an error, server MUST providestructuredContentconforming to the schema. The "not an error" qualifier is new — ifisError=truewith no/non-conforming structuredContent, SDK MUST NOT reject. - R-2200-6 (sdk): Clients SHOULD NOT validate
structuredContentagainstoutputSchemawhenisError=true. (Today the client validator likely throws onoutputSchemamismatch regardless ofisError.) - R-2200-1 (guidance): Clients SHOULD NOT forward both
contentandstructuredContentverbatim 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 tostructuredContentif empty. - R-2200-9 (guidance): Programmatic/typed clients SHOULD prefer
structuredContent. - R-2200-10 (guidance):
isError=true→ error message incontent;structuredContentMAY be omitted.
Suggested first PR
- Lift the "auto-stringify
structuredContentintocontent" branch in the SDK helper and replace it with explicit caller behavior. - In the client validator, gate
outputSchemavalidation on!result.isError. - Update JSDoc on
CallToolResult.structuredContentto reference the new prose.
Coordination
- Touches the same file as Implement SEP-2106: Tools inputSchema & outputSchema Conform to JSON Schema 2020-12 #2192 (
spec.types.ts). Bundling the structuredContent widening (SEP-2106 R-2106-6) with the visibility rules (SEP-2200) avoids duplicate review of the same lines. - No cross-track dependencies.
- Nothing in
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/callinterface 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.- moved this from Todo to Done in 2026-07-28 Spec Implementation
on Jun 9, 2026
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
- StatusShow more project fieldsDone
This is a tracking issue for implementation of SEP-2200.