Progressive tool discovery in MCP
Been playing around with progressive tool discovery in MCP lately and it's kind of changed how I think about setting these things up.
If your MCP server has like 30+ tools and you just load all their full schemas every single call, it's a mess. Tokens burned on stuff you're not even using, and honestly the model starts fumbling which tool to pick because there's just too much sitting in front of it.
What's worked way better is only showing the model a name and a quick one liner for each tool up front. Then when it actually needs something, it does a search first and only pulls in the full schema for that one tool. Seen two flavors of this:
Project based, where the tools are scoped to whatever repo or workspace you're currently in, so you're not even seeing tools that don't apply.
Global based, where literally every tool from every connected server sits behind one search step, and you just query it like "send a slack message" and it hands back the right one.
Here's roughly how I set the global version up. You build one lightweight "search_tools" function that just returns names and one liners for anything matching the query, nothing more:
search_tools("create calendar event") returns something like [{ name: "calendar.create_event", desc: "Create a calendar event" }]
Then a second call, get_tool_schema("calendar.create_event"), actually returns the full schema with all the params, and that's the only point it enters context. For the project based version, same idea but instead of searching across everything, you drop a small config file in the repo, something like .mcp-project.json, listing which servers or tools are actually relevant to that project, and the client only exposes those from the start.
Anyone else doing this already? Curious if you're going project scoped, global, or mixing both.
4
1 comment
Vuk Milić Simić
5
Progressive tool discovery in MCP
AI Automation Society
skool.com/ai-automation-society
Learn to get paid for AI solutions, regardless of your background.
Leaderboard (30-day)
Powered by