Repository navigation
[Bug] MCP tool parameters arrive at MCP servers as {} — affects tavily/brave/context7/chrome-devtools on glm-5.3-flash and gpt-5.6-luna; built-in tools unaffected #1306
Description
Status (2026-09-09): Still reproduces on 0.0.172 after a clean reinstall. Root cause is covered by PR #1259 (bug families 1, 5, 6); fix files are not yet present in the 0.0.172 package (no zod-safe-clone in the shipped bundle).
What happened
Every tool call to any MCP-server-provided tool arrives at the MCP server with an empty arguments object ({}) — the model's parameters never reach the tool. Validation fails with zod errors like expected string, received undefined.
Built-in tools (read_files, write_file, run_terminal_command, web_search, ask_user with deeply nested schemas, …) accept identical multi-parameter payloads with zero problems in the same session. The failure is model-independent: it reproduces on glm-5.3-flash and was independently observed on gpt-5.6-luna (separate session, same user), so this looks like a client/tool-bridge serialization bug rather than a model issue.
Repro rate: ~100% — zero successful parameterized MCP calls in the entire session, retried across many turns and tool servers.
This looks like the same root cause as #912 (tool inputSchema.properties stripped at registration → empty schema → expected string, received undefined). Filed as a standalone report because it reproduces on 4 mainstream servers (not just a niche Dart server) and 2 different models, which widens the blast radius. A fix for #912 is already pending in #1259 — this report adds reproduction evidence for merging it.
Steps to reproduce
- Start a freebuff session with any MCP server configured (tested:
tavily,brave-search,context7,chrome-devtools). - Ask the agent anything that triggers an MCP tool call, e.g. "search the web for X" (
tavily__tavily_search) or "open https://example.com in the browser" (chrome-devtools__navigate_page). - The model emits a well-formed tool call with parameters (e.g.
{"query": "X"}). - The MCP server receives an empty arguments object and returns a zod validation error (see Logs).
Controls in the same session (proves the model emits parameters correctly):
chrome-devtools__list_pages(zero params): SUCCESS- built-in
web_search {query, depth}: SUCCESS (dozens of calls) - built-in
read_files [{path}, {path, offset, limit}]: SUCCESS - built-in
ask_user {questions: [{question, header, options: [{label, description}], multiSelect}]}(deeply nested schema): SUCCESS
So: zero-param MCP tools work; 1+-param MCP tools receive {}; built-in tools with equal or more complex schemas work flawlessly. The parameters exist in the model's tool call but the object delivered to the MCP server is {}.
Where does this happen?
MCP servers or tools
Operating system
Windows
Version
0.0.172 (also reproduces on 0.0.93; retested after clean reinstall on 2026-09-09)
Model
glm-5.3-flash (also reproduced on gpt-5.6-luna in a separate session)
Logs or screenshots
Error during tool call: Invalid parameters for tavily__tavily_search: [
{ "expected": "string", "code": "invalid_type", "path": ["query"],
"message": "Invalid input: expected string, received undefined" }
]
Original tool call input: {}. Please check the tool name and arguments and try again.
Same signature for every affected tool:
| Tool | zod path | expected |
|---|---|---|
brave__brave_web_search |
["query"] |
string |
context7__resolve-library-id |
["query", "libraryName"] |
string |
chrome-devtools__navigate_page |
["pageId"] |
number |
chrome-devtools__new_page |
["url"] |
string |
Similar upstream bugs where tool-call arguments were dropped in the client→MCP path, for reference:
- [BUG] Claude Code no longer passing parameters to MCP anthropics/claude-code#2089 ("no longer passing parameters to MCP")
- [BUG] MCP tool calls with empty string "" parameter drop ALL parameters anthropics/claude-code#58281 (empty-string param drops ALL parameters)
- [BUG] MCP Tools Receive Empty Arguments When Using Permission Approval Flow anthropics/claude-agent-sdk-python#320 ("MCP Tools Receive Empty Arguments")
- MCP tools with no arguments fail with "Tool call not found" when using OpenAI (compatible) API zed-industries/zed#48955
- bug: MCP tools with no arguments fail: empty string not handled in tool call argument parsing open-webui/open-webui#23778
Debugging pointers: dump the raw tool_call arguments at the agent-loop boundary vs. what is dispatched to the MCP server; check any serializer that drops the whole arguments object on a falsy/empty value; check the strict JSON-schema↔zod conversion of MCP inputSchema (an unparseable conversion can make the client discard provided args before dispatch) — cf. the cloneDeepKeepingZod fix in #1259.
Activity
dvelm commentedon Sep 9, 2026
Update after reading the full #1259 thread — the root cause of this issue is now known, and our symptoms map onto three of the six bug families fixed there:
cloneDeepdrops zod v4's non-enumerable_zodengine → silent fallback serves an empty schema (this is MCP Tool inputSchema.properties stripped when registering tools from external MCP servers #912'sproperties: {}, ourOriginal tool call input: {}).getToolSet()→zod-from-json-schema→ loose objects/unions become zod custom types →z.toJSONSchema()throws →ensureJsonSchemaCompatible()substitutesz.object({}).passthrough()→ model-facing schema has no named properties, so constrained decoding emits{}and the MCP server receives no arguments.chrome-devtoolsunion params).PR status as of 2026-09-09: force-pushed rebuilt series (clean
mainbase, one semantic commit per fix, two-sided regression tests + live end-to-end overserver-everything's 13 tools), open, no formal reviews on the new head yet.No further action needed on this issue beyond merge tracking — it stands as the 4-mainstream-server (
tavily,brave-search,context7,chrome-devtools) / 2-model (glm-5.3-flash,gpt-5.6-luna) reproduction evidence for #1259.dvelm commentedon Sep 9, 2026
New control data point (2026-09-09) — same CLI (0.0.93), same MCP servers, different model: with
deepseek-v4-flashselected, every parameterized MCP call in the same test matrix succeeds:tavily__tavily_search{}brave__brave_web_search{}chrome-devtools__navigate_page{}context7__resolve-library-id{}chrome-devtools__list_pagesInterpretation: this rules out a blanket client-side serializer drop of tool arguments (a pure serializer bug would fail identically for every model). It is consistent with the empty model-facing schema path from #1259 (families 1 and 5): the schema presented to the model has no named properties, and models that use strict/constrained decoding (glm-5.3-flash, and per report gpt-5.6-luna) then emit literal
{}, whereas deepseek-v4-flash fills arguments from tool descriptions / looser decoding and therefore "works" in spite of the empty schema.Net effect: the bug still lives in the schema-presentation layer this PR fixes, but its user-visible impact is model-dependent — worth noting in the PR description so it is not mistaken for a model-side issue when triaging similar reports.
dvelm commentedon Sep 9, 2026
New retest after user's clean reinstall (2026-09-09) — CLI 0.0.172 (
npm uninstall -g freebuff && npm install -g freebuff):tavily__tavily_searchquery{}brave__brave_web_searchquery{}chrome-devtools__navigate_pagepageId,url{}context7__resolve-library-idquery,libraryName{}chrome-devtools__list_pageszod-safe-clonein bundle)Conclusions:
deepseek-v4-flashin the same environment (previous comment), fail onglm-5.3-flashon both 0.0.93 and 0.0.172 — matching the model-facing-schema failure mode from the Fix six bug families in MCP tool schema and result handling #1259 analysis.dvelm commentedon Sep 14, 2026
are you able to fix or I do?
dvelm commentedon Sep 14, 2026
Independent verification that #1259 fixes this, tested 2026-09-14 on current
main(69030b5, 159 commits ahead of the PR base):git cherry-pick, only overlap auto-merged inrun-agent-step.ts).agent-runtime35/35 incl. theschema._zod.parentcrash that fails on cleanmain,commonMCP 5/5 incl. real-stdio wiring test,llm-providers32/32). Fullagent-runtimesuite: 616 pass, 2 fail -- both fail identically on cleanmain(missingagents-graveyard/researcherfile, pre-existing). Typecheck: zero errors from any of the 23 fix files.freebuff.exefrom the patched tree and ran a full session onglm-5.3-flash(one of the two failing models) with tavily, brave-search and chrome-devtools configured -- 18 MCP calls, every parameterized call (tavily_searchwith query+depth+filters+time_range,brave_web_search,navigate_page,take_screenshot) arrived with args intact. Zero{}/zod errors. Only failures were page-render issues (old.reddit bot detection), unrelated to schema.So the fix works end-to-end on the exact failing setup from this issue. Question for maintainers: what is blocking the merge? Happy to help rebase/retest if needed.
Apply MCP schema fixes for parameterized tools on strict models (see C…
Apply MCP schema fixes for parameterized tools on strict models (see C…
Apply MCP schema fixes for parameterized tools on strict models (see C…
Apply MCP schema fixes for parameterized tools on strict models (see C…
Apply MCP schema fixes for parameterized tools on strict models (see C…
Apply MCP schema fixes for parameterized tools on strict models (see C…
Apply MCP schema fixes for parameterized tools on strict models (see C…
27 remaining items
Apply MCP schema fixes for parameterized tools on strict models (see C…
Apply MCP schema fixes for parameterized tools on strict models (see C…
Apply MCP schema fixes for parameterized tools on strict models (see C…
Apply MCP schema fixes for parameterized tools on strict models (see C…
Apply MCP schema fixes for parameterized tools on strict models (see C…
Apply MCP schema fixes for parameterized tools on strict models (see C…
Apply MCP schema fixes for parameterized tools on strict models (see C…
Apply MCP schema fixes for parameterized tools on strict models (see C…
Apply MCP schema fixes for parameterized tools on strict models (see C…
Apply MCP schema fixes for parameterized tools on strict models (see C…
Apply MCP schema fixes for parameterized tools on strict models (see C…
Apply MCP schema fixes for parameterized tools on strict models (see C…
Apply MCP schema fixes for parameterized tools on strict models (see C…
Apply MCP schema fixes for parameterized tools on strict models (see C…
Apply MCP schema fixes for parameterized tools on strict models (see C…