| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
The spec's serialized-text mirror alongside structuredContent is a SHOULD, not a MUST, but MCPServer forced it on every structured result. Add a per-tool `mirror_structured_content` flag (default True, so existing wire behavior is unchanged) that, when False, returns structuredContent only with empty content -- useful for large payloads or hosts that route structured content to the model themselves. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… claims The opt-out is a wire choice (emit the serialized content copy or not); which field a client forwards to a model is the client's decision, not the SDK's. Reword the docstring, parameter help, and docs to describe duplication rather than asserting content is "for the model." Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
| Back | FazBrowse Home | New Git URL |
Implements the pre-SEP opt-out discussed in #1332.
A tool with an output_schema currently always serializes its structured output into a content text block alongside structuredContent, doubling large payloads. The spec states this duplication is a SHOULD, not a MUST.
This adds a per-tool opt-out, threaded convert_result → Tool → tool_manager → add_tool/@tool: mirror_structured_content=False sends structuredContent only, with empty content. Default True preserves current behavior. Docs updated (docs/servers/structured-output.md); new test follows the in-memory Client(server) pattern.
AI disclosure: implemented with Claude Code assistance and I reviewed it.