1️⃣ Dynamic MCP Tool Filtering using Embedding & 2️⃣ Confident tool calls with BAML #2893
Replies: 7 comments 1 reply
-
Here is what I propose for the MCP specification update to facilitate dynamic tool discovery. Please support the idea here |
Beta Was this translation helpful? Give feedback.
-
Another elegant solution would be to allow MCP Clients to utilize the |
Beta Was this translation helpful? Give feedback.
-
Here is a paper that may be relevant |
Beta Was this translation helpful? Give feedback.
-
I think this is relevant. Addressing LLMs limitations in generating sophisticated long-form outputs. Survey analysis of over 1400 research papers:
https://github.com/Meirtz/Awesome-Context-Engineering |
Beta Was this translation helpful? Give feedback.
-
I believe that MCP Client should be able to do RAG with MCP to improve quality and scalability. |
Beta Was this translation helpful? Give feedback.
-
related #5963 |
Beta Was this translation helpful? Give feedback.
-
Context Rot Affects LLM Performance Longer input does not guarantee consistent results 🔍 Chroma researchers tested 18 LLMs on simple tasks
Research results https://github.com/chroma-core/context-rot ![]() |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi team 👋
First, thank you for the amazing work you're doing, Roo-Code! I've been diving into this ecosystem and wanted to propose a feature that I think would benefit a lot of developers working with large toolchains across multiple MCP servers.
🤖 The Problem
In the LLM-based Cline environment, we've seen that the reliability of tool usage drops significantly once the number of available tools exceeds ~20. This is a known issue: LLMs struggle to reason effectively when presented with too many tool options.
Now consider a real-world setup:
Currently, users are forced to manually disable MCP servers just to stay under the tool limit. It’s not scalable, and it limits the utility of what MCP can offer.
🎯 The Opportunity with Embeddings
Embedding filtering could be an ideal 1/2 solution to this scaling problem. Imagine dynamically filtering tools using semantic similarity between:
By narrowing the tool list down to the most relevant 20 (or a configurable limit), you:
✅ Keep the toolset within the LLM comfort zone
✅ Increase the accuracy of tool selection and calls
✅ Avoid manual management of tool/server lists
For example, if a user enters:
"Commit all my modified files and log their last modified timestamps before pushing to GitHub."
—Then only 2-3 tools from 2-3 MCP servers should be selected dynamically. There's no need to expose the full universe of 30+ tools.
This would allow MCP to scale elegantly even as more servers and tools come online. Ideally, this would support dynamic registration/deregistration of MCP servers and on-the-fly tool filtering
2️⃣ Execute tool calls more reliably with BAML
The second important part of the solution is to confidently call tools. We can enjoy the reliability of tool calls thanks to BAML capabilities (similar to Pydantic) to confidently populate all the required fields and parameters for the tool being called.
💡 Proposed Enhancements:
📚 References
BAML with MCP tools – example notebook
Large-scale classification with BAML
hello.py – example with Embeddings filtering
pick_best_category.baml
Would love to hear your thoughts on this! It could make the toolchain smarter, lighter, and way more user-friendly.
Thanks so much 🙏
Damein
Beta Was this translation helpful? Give feedback.
All reactions