claude-code - 💡(How to fix) Fix [BUG] MCP tool calls with empty string "" parameter drop ALL parameters

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Error Messages/Logs

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

When an MCP tool parameter has an empty string value (""), Claude Code's parameter serializer drops all parameters in the tool call — not just the empty one. The MCP server receives {}.

What Should Happen?

mpty string "" is a valid value and should be passed through to the MCP server like any other string.

Error Messages/Logs

Steps to Reproduce

  1. Connect any MCP server with a tool that accepts optional string parameters
  2. Call the tool with a mix of required params and one param set to ""
  3. Observe: the server receives an empty {} dict; all parameters (including required ones like IDs) are missing

Example with a update_device_metadata tool:

  • notes="test" → server receives {device_id: 718830, collector_id: 12071, notes: "test"} — correct
  • notes="" → server receives {} — all parameters dropped

The Claude Code permission prompt also shows no parameters when one is an empty string, confirming the issue is in serialization before the MCP transport.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.139

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] MCP tool calls with empty string "" parameter drop ALL parameters