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

Closed
ash wants to merge 1 commits 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
ash added 1 commit 2026-09-05 00:01:08 -05:00
client: Honor IsError and extract JSON from tool text
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 00:01:08 -05: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 00:01:43 -05:00
All checks were successful
CI / Test and build (pull_request) Successful in 14s
Required
Details

Pull request closed

Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: s1d3sw1ped/robinhood-agentic-mcp#17