client: Honor IsError and extract JSON from tool text #17

Closed
ash wants to merge 1 commit from client/tooljson-iserror into develop
Collaborator

What

Follow-up on #16 / closed #15 after Jerry dump arrived mid-flight.

  • IsError text is TrimSpaced (whitespace-only → tool error)
  • Prefer surfacing IsError text even when StructuredContent is present
  • rawJSON helper; try concatenated TextContent JSON before extract
  • Shape hint keeps types=[…] via %v; includes textLen
  • Unit tests mirror Jerry dump: IsError=true, StructuredContent=null, Text=end must be after start, GetError=nil

Why

Jerry dump: IsError=true, StructuredContent=null, Text=end must be after start, GetError=nil. Root paper time window remains tradey#2 (out of scope).

Test

go test ./... green

Notes

Do not merge until reviewed. Issue: #15

## What Follow-up on #16 / closed #15 after Jerry dump arrived mid-flight. - `IsError` text is `TrimSpace`d (whitespace-only → `tool error`) - Prefer surfacing `IsError` text even when `StructuredContent` is present - `rawJSON` helper; try concatenated TextContent JSON before extract - Shape hint keeps `types=[…]` via `%v`; includes `textLen` - Unit tests mirror Jerry dump: `IsError=true`, `StructuredContent=null`, Text=`end must be after start`, `GetError=nil` ## Why Jerry dump: IsError=true, StructuredContent=null, Text=`end must be after start`, GetError=nil. Root paper time window remains tradey#2 (out of scope). ## Test `go test ./...` green ## Notes Do not merge until reviewed. Issue: https://git.s1d3sw1ped.com/s1d3sw1ped/robinhood-agentic-mcp/issues/15
client: Honor IsError and extract JSON from tool text
All checks were successful
CI / Test and build (pull_request) Successful in 14s
a6cede784a
Fold Jerry dump into toolJSON: TrimSpace IsError text, concat JSON
via rawJSON, and unit tests mirroring IsError=true /
StructuredContent=null / Text=`end must be after start` / GetError=nil.
ash requested review from linus 2026-09-05 05:01:08 +00:00
Author
Collaborator

Closing without merge — race leftover. #15 already landed as #16 (51e1539 on develop). Jerry-dump IsError path is covered there; minor TrimSpace/test nits not worth a second PR.

Closing without merge — race leftover. #15 already landed as #16 (51e1539 on develop). Jerry-dump IsError path is covered there; minor TrimSpace/test nits not worth a second PR.
ash closed this pull request 2026-09-05 05:01:43 +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!17
No description provided.