RAG-MCP: Retrieve the Right Tools Instead of Dumping Them All In
- Source
- x.com
- Date
Context engineering > prompt engineering. As MCP-based systems scale, the real challenge isn't giving models more tools — it's helping them retrieve and reason with the right ones at the right time. Our Developer Advocate, Ashley Weaver explores RAG-MCP, a lightweight retrieval framework that uses semantic search to avoid context rot and keep tool selection accurate. Think: embed, rank, inject, reason. The results? 3x better tool accuracy, 50%+ fewer tokens, and a cleaner path to production-grade agentic systems. Full breakdown + working prototype 👇

Context
- gives an a relevant selection of tools to consider for each request. In WRITER's walkthrough, a retrieval step compares the meaning of the request with tool descriptions, ranks the matches and supplies selected descriptions to the language model. The model then decides which tool to call. This keeps unrelated tool instructions out of its working as the available catalog grows. The walkthrough develops the retrieval side of WRITER's earlier MCP gateway design and includes a lightweight prototype of that selection process.
- RAG — Retrieval-augmented generation — fetching relevant documents first and pasting them into the model's context so it answers from your data instead of memory.
- MCP — The Model Context Protocol — an open standard that lets any AI assistant plug into any tool or data source without custom integration code.
- AI agent — An AI system that doesn't just answer once but works toward a goal in a loop — taking actions, reading the results, and deciding what to do next.
- context window — The maximum amount of text a model can consider at once — its working memory for the current conversation or task.
articleCartograph: Federated Tool Discovery with Operator-Attested Retrieval for AI AgentsJustice Owusu Agyemang, Michael Agyare, Kwame Opuni-Boachie Obour Agyekum, Kwame Agyeman-Prempeh Agyekum, Francisca Adoma Acheampong, Jerry John Kponyo
postCollapsing hundreds of API endpoints into two MCP toolsWRITER
videoThe 100-Tool Agent Is a Trap - Sohail Shaikh & Ankush Rastogi, ProsodicaAI Engineer
Checking sign-in…
Loading comments…


