fix(mcp): strip null values from MCP tool call arguments#96755
fix(mcp): strip null values from MCP tool call arguments#96755krissding wants to merge 1 commit into
Conversation
Some MCP servers (e.g. awslabs eks-mcp-server) distinguish between null and absent for optional parameters. When the LLM passes null for an optional field, treat it as "not provided" by stripping top-level null values from arguments before calling the MCP server. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
|
Codex review: needs real behavior proof before merge. Reviewed June 25, 2026, 7:37 AM ET / 11:37 UTC. Summary PR surface: Source +10. Total +10 across 1 file. Reproducibility: no. high-confidence live reproduction was run in this review. Source inspection and reporter evidence show a plausible null-to-empty-string path, but there is no real awslabs EKS MCP run or raw wire capture here. Review metrics: 2 noteworthy metrics.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Preserve explicit JSON nulls by default and fix validation/coercion, or omit null only for schema-proven optional fields with focused regression coverage and redacted real MCP proof. Do we have a high-confidence way to reproduce the issue? No high-confidence live reproduction was run in this review. Source inspection and reporter evidence show a plausible null-to-empty-string path, but there is no real awslabs EKS MCP run or raw wire capture here. Is this the best way to solve the issue? No. Unconditional top-level null stripping is too broad and likely too late for the reported Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 4ecb45bf7729. Label changesLabel justifications:
Evidence reviewedPR surface: Source +10. Total +10 across 1 file. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
Summary
nulland absent for optional parameters, causing tool calls that passnullfor optional fields to fail{ insight_id: null }becomes{}— matching the "not provided" semantics of JSON Schema optional parametersTest plan
Closes #96716
🤖 Generated with Claude Code