MCP over HTTPs - 55 tools found, agent is unaware of them #8045
Replies: 10 comments 12 replies
|
This looks like deferred loading doing what it is supposed to do, but the model is not taking the tool_search step. So I would debug in this order: Ask the model very explicitly to use tool_search, for example: Use the tool_search tool with query "mcp_abby" and max_results 20, then tell me which mcp_abby tools were activated. or, if you know an exact tool name: Temporarily disable deferred loading: [mcp] Check capability filtering if tool_search cannot see them. The MCP docs mention tool_filter_groups, allowed_tools, and excluded_tools as separate gates. A risk/profile or per-run allow-list can keep deferred tools out of the prompt/search results even though the server connected. Since you are using kimi-k2.6 through Moonshot, also test one run with deferred loading off. Some models/providers are weaker at following the "call tool_search first" instruction, especially when the real tools are hidden behind a discovery tool. In short: 55 tool(s) available means the MCP server is connected; 55 tool stub(s) means the concrete tools are intentionally not loaded yet. The first thing to prove is whether tool_search can activate mcp_abby__... tools. |
|
Actually in zerocode even with deferred_loading disabled the agent does not see the tools which is weird because in the gateway web ui it does.. |
|
@bryangruneberg thanks for the clear report, and thanks @krotname for the deferred-loading explanation. I think there are two cases to separate here. With The newer note from @susyabashti is the more interesting part: if the gateway web UI sees the tools but Zerocode does not see them even with deferred loading disabled, that may be a Zerocode/session registration path difference or a tool-policy filtering issue rather than a remote MCP connection issue. Useful next debugging info:
If this reproduces with |
|
Two separate things are tangled in this thread, and the second one (the deferred-off case @susyabashti hit) has a precise cause in the source.
So if the Zerocode session is started with a caller-supplied per-run Concrete check for whoever's on the deferred-off variant: is the session launched with a per-run (For context on why I recognized the shape: I run an agent on this same deferred-tool pattern — name-only stubs, fetch-schema-before-call, a |
|
@bryangruneberg @susyabashti thanks, the newer details make this look like more than a deferred-loading prompt/model issue. A few things I’d separate:
I think this should now be tracked as a bug rather than left as general Q&A. I created an issue #8193 . |
|
@bryangruneberg @susyabashti this should be fixed on Root cause: Zerocode TUI Chat sessions were building the agent with MCP initialization disabled, so they skipped both deferred The merged fix makes Chat-mode |
|
Building on @krotname — discovery logs are green, so transport is fine; the gap is between "registered with the gateway" and "told to the model." With
One caution either way: past ~40 tool schemas models start mis-selecting, so dumping all 55 raw has its own cost — deferred loading exists for exactly this, so the durable fix is a reliable search step, not loading all 55. |
|
Did some code-tracing on the deferred Both paths do build a populated The regression test only checks presence, not results. Two candidate mechanisms I haven't confirmed:
The test-gap is the concrete takeaway; #1/#2 are just leads. Let me know if a functional repro test would help. |
|
Quick follow-up with a concrete result. I wrote the functional test we discussed — it spins up a deferred-MCP Zerocode Chat session (via On current master it passes. So the agent-construction path ( That narrows #8193 to the gateway path: Happy to (a) open a small PR with this passing test as a regression guard for the agent layer, and/or (b) dig into the gateway |
|
#8193 (comment) I think this solves my issue 😁 |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I have mcp setup...
The logs show the tools are discovered...
However. if I ask the agent to call or interact or even report the tools available, none of them seem to be listed.
If there is a way to debug this, I'm stumped 😁
Any advice to a zeroclaw newb?
PS - I'm using kimi-k2.6 on the moonshot.ai endpoint
All reactions