Skip to content

Pass the parsed tool ref to the deployment tool caller, not the raw body - #519

Merged
davidmckayv merged 1 commit into
mainfrom
fix/agent-tool-call-use-parsed
Sep 13, 2026
Merged

Pass the parsed tool ref to the deployment tool caller, not the raw body#519
davidmckayv merged 1 commit into
mainfrom
fix/agent-tool-call-use-parsed

Conversation

@davidmckayv

Copy link
Copy Markdown
Contributor

What this changes

Restores main to a clean typecheck. The agent-tool-call route validates its input into parsedCall (from #510), but the deployment-tool-caller call still read the raw body (name: body.name, args: body.args ?? {}) — where body is possibly null and body.name possibly undefined, and the narrowing guard that used to cover it was removed. That left server/src/app.ts:1333 failing bun run typecheck and bun run build on main.

The call now passes the validated, store-shaped values: name: parsedCall.value.ref (the mcp__server__toolserver/tool mapping the parser already performs) and args: parsedCall.value.args. Same runtime behavior the mapping always produced; the raw, unnarrowed body is no longer read.

Where it runs

Server route wiring only. No behavior change beyond restoring the intended validated path.

Proof

bun run typecheck, bun run build, bun run lint, bun run format:check all clean; server/tests/agent-tool-call-input.test.ts 26/0.

@davidmckayv
davidmckayv merged commit 872d3a6 into main Sep 13, 2026
15 checks passed
@davidmckayv
davidmckayv deleted the fix/agent-tool-call-use-parsed branch September 13, 2026 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant