client: Prefer structuredContent in toolJSON #14

Merged
linus merged 1 commit from client/tooljson-structured into develop 2026-09-05 04:45:26 +00:00
Collaborator

What

Prefer CallToolResult.StructuredContent in client.toolJSON (marshal → json.RawMessage) before falling back to TextContent JSON.

Why

On CT113, paper make once fails with historicals: mcp get_equity_historicals: non-json tool result even though auth and quotes/accounts work. Robinhood may return structured historicals with empty/non-JSON text; toolJSON previously ignored StructuredContent (SEP-2106 / go-sdk v1.7.0).

Test

  • go test ./... green (new TestToolJSON: structured-only, text JSON, text non-JSON + structured, empty; plus nil / GetError / non-JSON text)
  • Existing equity TestHistoricals_rhntest still passes; no envelope widen

Issue: #13

Do not merge until Remy re-proves after deploy (paper only).

## What Prefer `CallToolResult.StructuredContent` in `client.toolJSON` (marshal → `json.RawMessage`) before falling back to TextContent JSON. ## Why On CT113, paper `make once` fails with `historicals: mcp get_equity_historicals: non-json tool result` even though auth and quotes/accounts work. Robinhood may return structured historicals with empty/non-JSON text; `toolJSON` previously ignored StructuredContent (SEP-2106 / go-sdk v1.7.0). ## Test - `go test ./...` green (new `TestToolJSON`: structured-only, text JSON, text non-JSON + structured, empty; plus nil / GetError / non-JSON text) - Existing equity `TestHistoricals_rhntest` still passes; no envelope widen Issue: https://git.s1d3sw1ped.com/s1d3sw1ped/robinhood-agentic-mcp/issues/13 Do not merge until Remy re-proves after deploy (paper only).
client: Prefer structuredContent in toolJSON
All checks were successful
CI / Test and build (pull_request) Successful in 12s
bc50f3fd6b
get_equity_historicals can return MCP StructuredContent with empty or
non-JSON TextContent. Prefer StructuredContent (marshal to RawMessage)
so paper tradey once/run can parse historicals.

#13
ash requested review from linus 2026-09-05 04:41:01 +00:00
ash self-assigned this 2026-09-05 04:41:01 +00:00
linus merged commit 11feaad0e3 into develop 2026-09-05 04:45:26 +00:00
Commenting is not possible because the repository is archived.
No reviewers
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
s1d3sw1ped/robinhood-agentic-mcp!14
No description provided.