Ways to reduce tool context overload #152
Replies: 3 comments 2 replies
-
|
this will be very helpful. One of the next level changes, that i have faced is that apis responses are not optimised for MCP, so claude context get populated very fast, if there is way one can control tool response easily via a config, think of graphql for MCP, that would be really powerfull, this will save a lot of time and effort to change existing endpoints. this is a huge pain. |
Beta Was this translation helpful? Give feedback.
-
|
After reading skills, I think it solves different problem Lets say: "When doing code review, first read the PR diff, then check for security issues, then..." - it's a sequential knowledge, not tool reduction. Even with Skills, if we have 100 tools, the agent still sees 100 tools. Skills tell the agent which tools to use and how but the tools are still all there in context. It is best when
The first idea could solve this better So instead of exposing 100 tools, just 3 is fine
|
Beta Was this translation helpful? Give feedback.
-
|
I really like the Dynamic Discovery (Option 1) with the 3 meta-tools. It's exactly the right approach instead of dumping 100+ tool schemas upfront, let the LLM discover what it needs. But I want to echo @devilankur18's point about response bloat. Even if we fix the input side, a single tool call returning 50KB of JSON still destroys the context window on the output side. Idea: Add JSONPath Projection to
|
| Approach | Input | Output | Total |
|---|---|---|---|
| Current (100 tools pre-loaded) | 20K | 12K | 32K |
| Meta-tools + Projection | 800 | 200 | 1K |
That's 97% less context used.
Why This Works
- Solves both input bloat (meta-tools) AND output bloat (projection)
- Backward compatible—no MCP protocol changes needed
- MCPJungle controls everything, servers unchanged
- Basically "GraphQL for MCP"
for skills and search_tools idea
Skills - Agreed with @ankittk, they solve workflow problems not context reduction. Until MCP protocol lets Skills conditionally expose tools, they won't help here.
search_tools - Could work but semantic search is tricky. Meta-tools + projection is more deterministic.
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Problem
When a user adds multiple MCPs to mcpjungle, they end up with potentially 100s of tools being exposed via the global MCP endpoint.
This means every LLM interaction includes the basic metadata about all these tools, causing unnecessary context overload and token costs, reducing LLM accuracy.
This is a widely faced & discussed problem.
Current Solutions
MCPJungle currently already provides Tool Groups to allow you to cherry-pick specific tools and create a new MCP endpoint that only exposes those tools. User can point the agent to this special endpoint and the LLM only sees the select few tools, reducing context burden.
This is great for specialized agents in whose case, user knows upfront the limited set of tools that are relevant.
Proposed Ideas
I'd like to propose multiple ideas on how else mcpjungle could better serve its users on this issues.
Here are some ideas from me and I'm open to hearing feedback on them / more ideas:
list_mcp_tools,describe_tools,call_toolWhen the LLM starts the interaction, it can decide whether it needs to explore the tools available. If yes, it calls list_mcp_tools which then returns 2 pieces of info for each tool - name & description. LLM can then choose to get full info about 1 or more tools using describe_tools and finally, use call_tool and pass it tool name + payload to invoke the desired tool(s).
This removes the 100s of tools in the context upfront but increases the back-and-forth between agent & mcpjungle.
Expose a
search_toolstool.The LLM describes what kind of tool(s) it is looking for (what it wants to achieve) and mcpjungle could return best results for tools. Then the LLM could call the
call_toollike I described above.Explore how we can work with Skills
Some people are experimenting with Code mode, ie, LLM writes code that orchestrates all the tools rather than being directly exposed to them.
Beta Was this translation helpful? Give feedback.
All reactions