Commit df23604
fix(mcp): strip null values from tool call arguments before sending
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]>1 parent 4ecb45b commit df23604
1 file changed
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
40 | 50 | | |
41 | 51 | | |
42 | 52 | | |
| |||
902 | 912 | | |
903 | 913 | | |
904 | 914 | | |
905 | | - | |
| 915 | + | |
906 | 916 | | |
907 | 917 | | |
908 | 918 | | |
| |||
0 commit comments