refact icon indicating copy to clipboard operation
refact copied to clipboard

Feature request. MCP Client improvement - Decrease token use, increase quality: Dynamic tool selection

Open qdrddr opened this issue 5 months ago • 7 comments

We need to improve the MCP Client. Currently, all tools are simply listed consuming context window, creating Context Rot, meaning worse results for more tokens/money.

To fix that I think it’s appropriate to implement MCP-RAG on the MCP Client end to pull a list of semantically close tools for each user prompt dynamically.

Suggested embedding model: codestral-embed from Mistral. And Mxbai-rerank-v2 to improve performance for, code, MCP, and tool retrieval.

Image

qdrddr avatar Jul 29 '25 19:07 qdrddr

Some ideas on how https://github.com/modelcontextprotocol/modelcontextprotocol/discussions/845

qdrddr avatar Jul 29 '25 19:07 qdrddr

Suggested Embedded (In-Progress) VectorDBs:

https://github.com/tursodatabase/turso https://github.com/chroma-core/chroma https://github.com/lancedb/lancedb DuckDB with VSS extention

qdrddr avatar Jul 30 '25 13:07 qdrddr

Would appreciate if you vote for this improvement idea to standardize MCP Specification with Delegated Advanced Tool Search in my comment feature here.

qdrddr avatar Jul 31 '25 21:07 qdrddr

MCP-Agent with EmbeddingRouter for semantic tool search and filtering.

https://github.com/lastmile-ai/mcp-agent

qdrddr avatar Aug 22 '25 00:08 qdrddr

MCP-use implemented a tool semantic search mechanism https://github.com/mcp-use/mcp-use

qdrddr avatar Aug 26 '25 21:08 qdrddr

MCP-Universe: Benchmarking Large Language Models with Real-World Model Context Protocol Servers.

Key findings: “Long-Context Challenge

Token count increases rapidly with interaction steps, often leading to context overflow and degraded performance in multi-step tasks requiring extensive reasoning.”

This proves how MCP tool pre-filtering (prior LLM) is important, and as I was saying, especially manifests in multi-steps.

https://mcp-universe.github.io

qdrddr avatar Sep 02 '25 19:09 qdrddr

Cloudflare Turns MCP Tools into TypeScript APIs

Cloudflare proposes converting MCP tools into TypeScript APIs so that LLMs can generate code using them. They aim to address two key issues: managing many tools and chaining multiple calls efficiently while reducing token usage.

🔧 Improves handling of many complex tools
💡 Enables multi-step automation with fewer tokens

https://blog.cloudflare.com/code-mode/

qdrddr avatar Oct 11 '25 21:10 qdrddr