client: Prefer structuredContent in toolJSON #14
Reference in New Issue
Block a user
Delete Branch "client/tooljson-structured"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Prefer
CallToolResult.StructuredContentinclient.toolJSON(marshal →json.RawMessage) before falling back to TextContent JSON.Why
On CT113, paper
make oncefails withhistoricals: mcp get_equity_historicals: non-json tool resulteven though auth and quotes/accounts work. Robinhood may return structured historicals with empty/non-JSON text;toolJSONpreviously ignored StructuredContent (SEP-2106 / go-sdk v1.7.0).Test
go test ./...green (newTestToolJSON: structured-only, text JSON, text non-JSON + structured, empty; plus nil / GetError / non-JSON text)TestHistoricals_rhnteststill passes; no envelope widenIssue: #13
Do not merge until Remy re-proves after deploy (paper only).