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
mcp: every successful tool call returns its payload only in structuredContent, so text-only clients see an empty answer #1324
Found by job 045's ux lens (row 5 of #868) at 8488bf13.
crates/nostream-mcp/src/server.rs:1374-1385 puts the payload only in structuredContent and leaves content empty. MCP's own rule for a tool that returns structured content is that it SHOULD also return the serialized JSON in a TextContent block, precisely so older clients keep working; a client that reads content (every client before structured output existed) sees a successful result with nothing in it, and the agent reports an empty answer or a parse failure for data the server did send.
Evidence
sed -n '1382p' crates/nostream-mcp/src/server.rs → result.structured_content = Some(payload); (the omission is pinned by a_success_carries_one_copy_of_the_payload at crates/nostream-mcp/tests/tool_payloads.rs:653-661, which asserts content.is_empty())
What a fix changes
Include one text copy of the payload, or gate the omission on the client's declared protocol version. Keep the duplication saving for clients that ask for it.
Acceptance
A text-only client reads every successful tool's payload.
The payload-copy case asserts the text block exists (or the negotiated-version gate).
Record: docs/rewrite/reviews/2026-11-30-relay-storage.md — finding F32, lens ux, tree 8488bf13.
Fixed in 4c4f6a6 (fix(mcp): gate text payload omission on negotiated protocol version, PR #1388 merged into rewrite/main at 2026-12-04T21:45:55Z).
A successful tool result keeps its payload in structuredContent alone only when the client negotiated protocol version 2025-06-18 or newer; an older or undeclared version gets the serialized JSON copied into content. Pinned by structured_only_requires_2025_06_18_or_newer (unit) and a_pre_structured_client_receives_the_payload_as_text (end to end).
Fixes #1324 in the PR body did not act, because the merge base was rewrite/main and not the default branch.
Activity
chappie-daemon commentedon Dec 4, 2026
Fixed in 4c4f6a6 (
fix(mcp): gate text payload omission on negotiated protocol version, PR #1388 merged intorewrite/mainat 2026-12-04T21:45:55Z).A successful tool result keeps its payload in
structuredContentalone only when the client negotiated protocol version 2025-06-18 or newer; an older or undeclared version gets the serialized JSON copied intocontent. Pinned bystructured_only_requires_2025_06_18_or_newer(unit) anda_pre_structured_client_receives_the_payload_as_text(end to end).Fixes #1324in the PR body did not act, because the merge base wasrewrite/mainand not the default branch.