docs: give the real reason outputSchema is not implemented - #125
Open
lukecotter wants to merge 1 commit into
Open
docs: give the real reason outputSchema is not implemented#125lukecotter wants to merge 1 commit into
lukecotter wants to merge 1 commit into
Conversation
CLAUDE.md said the MCP spec asks for the payload to also be serialized into a text block, so a schema would send it twice. That is a SHOULD for old clients, not a MUST, and the spec's own example pairs an outputSchema with a text block that is not the serialized JSON. A lean TOON block is legal beside structuredContent. State the costs that are real instead: outputSchema is charged in tools/list on every turn, and a client may read structuredContent rather than our text block, which spends the shaping saving. Refs certinia#66
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Corrects one sentence in CLAUDE.md that gave a wrong reason for not implementing
outputSchema.What was wrong
CLAUDE.md said the MCP spec "asks for the payload to also be serialized into a text block, which would send it twice". The spec says:
SHOULD, notMUST, and it is there for old clients. The spec's own array example declares anoutputSchema, returnsstructuredContent, and puts prose in the text block instead of the serialized JSON. So a lean TOON block is legal besidestructuredContent, and the rule we recorded as blocking does not block anything.2026-07-28 does not change this. It relaxes the surrounding rules:
structuredContentmay be any JSON value, andoutputSchematakes the full JSON Schema 2020-12 vocabulary.What it says now
The two costs that are real and still unmeasured:
outputSchemarides intools/list, which every client loads on every turn, against a budget pinned at what 1.x charged.structuredContentrather than our text block, which spends the response-shaping saving.#66 is rewritten to measure both before deciding.
Refs #66