Making the full tool set easier to reach over MCP #353
Replies: 4 comments 2 replies
-
|
Hello, thanks for working on this! I don't like the direct_flat idea but whatever, we can have it as a flag for models that can handle it. The find_tools sounds good. It's great to learn from other systems who have had to solve similar problems. Please send the PR and I'll review and check it in. I think keyword search is enough, especially if we tell them the domains to search for. |
Beta Was this translation helpful? Give feedback.
-
|
@Augusto-Zolet Besides this, are there any bugs in the latest code you think should be fixed before the next release? This extension is pretty big now (~80kloc not including tests) so I want to make sure it's stable. I added something to report UNO thread violations so if you find any, please let me know or send a PR. I just found a few and fixed them so try on the latest code in Git. |
Beta Was this translation helpful? Give feedback.
-
|
Just opened the PR: #355 |
Beta Was this translation helpful? Give feedback.
-
|
Awesome! I accepted it and then made a few simplifications in the next commit. We don't need to do fancy search if we just expose the full domain list and tell them to use it. Let me know if you see any issues. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Heloooooo! Coming back to the idea of making the full tool set easier to reach over MCP, I went deep on it and worked out the following approach:
The problem (recap)
Over MCP we advertise ~12 core tools; the ~138 specialized ones are only reachable through the
delegate_to_specialized_*gateway, which launches a separate sub-agent (a second LLM call) to pick and run the specialized tool, so it only works when an LLM backend is configured. I'd like to reach them directly, without that indirection.Modes, selectable by a config flag
By default we keep today's behavior; the flag is
mcp.tool_exposure_mode:delegate(default)direct_flatdirect_discoveryfind_toolssearch tool1.
direct_flat, why keep it (and the honest part)I checked whether native tool-search "performs better" enough to justify this mode. Honestly: not on retrieval quality, Anthropic's Tool Search Tool is BM25/regex-based, and independent reports suggest a good server-side semantic+BM25 search can match or beat it. So I'm not selling
direct_flatas the high-performance mode. Its real value is native integration: capable clients already have an in-context, prompt-cache-friendly search built in, but it only kicks in if the server advertises the full catalog.direct_flatis the server half they need, it's a ~1-line change, and it skips the extrafind_toolsround-trip for those clients. (Foot-gun: for clients without native search it's the bloat case, so it's explicitly a "capable-client" mode.)2.
direct_discovery(find_tools), the client-agnostic SOTAfind_tools(query, domain?):domain→ a precise pre-filter via the existing domain registry;query→ ranking over tool name/description/args; returns the top ~5–8 full schemas, plus the available domains and per-domain usage hints. The agent then calls the real tool by name.find_toolsonly shows up when this mode is on.On the ranker: I'd start with BM25 (keyword matching), it's lightweight and easy to ship. Semantic search with embeddings would be better, as a natural upgrade later.
The delegate's hints
The
delegatealso adds small per-domain hints (e.g. for charts in Calc: "you must pass adata_range"). We fold those into the direct modes, into the tool descriptions / thefind_toolsoutput, so the agent still gets them.Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions