client: Prefer structuredContent so get_equity_historicals parses #13
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
Problem
On tradey CT113,
make infoworks (auth/tokens OK) but papermake oncefails:Error comes from
client/session.gotoolJSONwhen TextContent bytes failjson.Valid. Quotes/accounts path works; historicals fails — MCP response shape, not auth.Likely cause (verify)
toolJSONonly concatenates*mcp.TextContentand ignoresCallToolResult.StructuredContent(go-sdk v1.7.0 / SEP-2106). Robinhood may return structured historicals with non-JSON or empty text.Goal
Fix the mechanism so paper tradey
once/runcan fetch historicals through this library.Out of scope
Acceptance
StructuredContentwhen present (marshal →json.RawMessage); else TextContent when valid JSON; clear error otherwise.parseHistoricalsstill works; widen envelopes only if fixtures show it.go test ./...green.area: Imperative summary(e.g.client: Prefer structuredContent in toolJSON).Re-prove (after merge / deploy on CT113)
Revert
git revertthe PR commit(s). No DB.