fix(mcp): return structured compact results#1043
Conversation
Tools advertise an object outputSchema, so strict MCP clients reject compact TOON responses that omit structuredContent. Signed-off-by: wargloom <wargloom@gmail.com>
|
Thanks for the compact structured-result fix. This is a normal-priority 0.9.1-rc MCP compatibility bug. Review will verify the JSON-RPC structuredContent contract, content fallback behavior for older clients, error responses, and that compact mode does not silently change existing tool payload semantics. |
|
Merged. This closes a real protocol-compliance gap in the TOON compact-output work (#1013): every MCP tool advertises an object |
What does this PR do?
Every MCP tool advertises an object
outputSchema, but compact TOON andplain-text results omitted
structuredContent. Strict MCP clients thereforerejected otherwise successful tool calls with
-32600.This change keeps JSON-object results unchanged and adds an object for every
other result:
{"text":"..."}{"error":"..."}The existing text
contentblock remains for model visibility and backwardscompatibility.
Validation
ASAN_OPTIONS=detect_leaks=0 make -f Makefile.cbm test— 6,009 passed,1 skipped
make -f Makefile.cbm lint-cisearch_graphresponses plus unit coveragefor plain-text and error results
Checklist
git commit -s) — required, CI rejectsunsigned commits (DCO, see CONTRIBUTING.md)
make -f Makefile.cbm test)make -f Makefile.cbm lint-ci)