You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Implement SEP-2200: Clarify tool result content visibility #2193
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
Lift the "auto-stringify structuredContent into content" branch in the SDK helper and replace it with explicit caller behavior.
In the client validator, gate outputSchema validation on !result.isError.
Update JSDoc on CallToolResult.structuredContent to reference the new prose.
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.
Activity
mattzcarey commentedon May 29, 2026
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.mdxvia other commits. The spec page treats this as a real release-1 SEP.What's done
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)
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).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.structuredContentagainstoutputSchemawhenisError=true. (Today the client validator likely throws onoutputSchemamismatch regardless ofisError.)contentandstructuredContentverbatim to the model.content, fall back tostructuredContentif empty.structuredContent.isError=true→ error message incontent;structuredContentMAY be omitted.Suggested first PR
structuredContentintocontent" branch in the SDK helper and replace it with explicit caller behavior.outputSchemavalidation on!result.isError.CallToolResult.structuredContentto reference the new prose.Coordination
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.norika1207-lab commentedon Jun 2, 2026
mattzcarey commentedon Jun 9, 2026
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.