Skip to content

fix: send empty object instead of null for anthropic tool input - #9320

Closed
DOsinga wants to merge 2 commits into
mainfrom
fix/9287-anthropic-null-tool-input
Closed

DOsinga wants to merge 2 commits into
mainfrom
fix/9287-anthropic-null-tool-input

Conversation

@DOsinga

@DOsinga DOsinga commented May 19, 2026

Copy link
Copy Markdown
Collaborator

When an MCP tool has no parameters, tool_call.arguments is None, which serialized to JSON null. The Anthropic API rejects null for the input field, requiring an empty object {} instead.

This is the same fix applied to Bedrock in #8121 but was missing from the Anthropic provider.

Fixes #9287

Douwe Osinga added 2 commits May 19, 2026 09:44
The 🪿 (goose) emoji in the CLI prompt is rendered as 1 cell wide on
many terminals while unicode-width counts it as 2. This causes cursor
misalignment — characters appear spaced out and backspace behaves oddly.

Rather than try to detect which terminals render it correctly, just use
the plain '> ' prompt everywhere in the CLI. Users who want a fancier
UI can use the TUI.

Fixes #8841

Signed-off-by: Douwe Osinga <douwe@squareup.com>
When an MCP tool has no parameters, tool_call.arguments is None, which
serialized to JSON null. The Anthropic API rejects null for the input
field, requiring an empty object {} instead.

This is the same fix applied to Bedrock in #8121 but was missing from
the Anthropic provider.

Fixes #9287

Signed-off-by: Douwe Osinga <douwe@squareup.com>
@jamadeo

jamadeo commented May 22, 2026

Copy link
Copy Markdown
Member

fixed in #9355

@jamadeo jamadeo closed this May 22, 2026
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.

Error using a parameterless MCP tool with Anthropic provider

2 participants