You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MCP server/tool instructions add a lot of bloat to initial system context even if using "lazy" tool discovery #684
I noted this with semcode which offers a --lazy flag to reduce the initial context cost of the MCP. It dutifully advertises only:
<deferred-tool name="semcode__call_tool" description="Execute a semcode tool by name with given arguments. Use get_tools first to see the required arguments."/>
<deferred-tool name="semcode__get_tools" description="Get the full schema for tools in a category. Use this to get tool details before calling them."/>
<deferred-tool name="semcode__list_categories" description="List available tool categories. Call this first to discover what semcode can do."/>
as tools but then ECA dump the entire instructions file in the MCP server instructions. Arguably this could be described as semcode's issue (and will prepare a patch for it) however it does raise a bigger question about how ECA approaches managing it's context. There seems to be a variety of approaches that the various agents do from suppressing completely to having their own custom instructions schemas. I thought it would be worth raising this issue to discuss the various context management approaches ECA could take.
To upvote this issue, give it a thumbs up. See this list for the most upvoted issues.
It might still be beaving "correctly" (as in, as intended) - when I implemented it I decided to have it send a truncated version of the tool description (just the first paragraph, max of 250 characters) even if it was deferred. Can you confirm if the schemas are being omitted?
The full description (if over 1 paragraph) + the tool call schemas are what are deferred. In the MCP servers that I use most frequently this ended up getting rid of a lot of the bloat.
It's a trade-off between making the agent know that it could exist (which pushes it to finding the tool later when it needs it) versus saving context maximally. This was an attempt to strike that balance.
I think we could potentially make it configurable - ie. eca could send truly nothing, just the tool names, or the tool names + truncated descriptions; that being said, at least with my use cases this ended up being the "sweet spot".
I certainly wasn't seeing the truncated description but the whole of instructions which is more than a paragraph. I have submitted a PR on semcodes side which does work.
I couldn't find anything to improve besides a configurable flag as mentioned, besides that seems like something to be fixed on semcode, LMK if you think we should prioritize the config flag
Activity
zikajk commentedon Oct 30, 2026
@stsquad Have you tried mcpSearchTool, doesn't it solve the problem for you?
stsquad commentedon Oct 30, 2026
I have:
but I still see the instructions dumped in the initial prompt.
zikajk commentedon Oct 30, 2026
Do you know what might be the problem here @ericdallo @rschmukler?
rschmukler commentedon Oct 30, 2026
It might still be beaving "correctly" (as in, as intended) - when I implemented it I decided to have it send a truncated version of the tool description (just the first paragraph, max of 250 characters) even if it was deferred. Can you confirm if the schemas are being omitted?
The full description (if over 1 paragraph) + the tool call schemas are what are deferred. In the MCP servers that I use most frequently this ended up getting rid of a lot of the bloat.
It's a trade-off between making the agent know that it could exist (which pushes it to finding the tool later when it needs it) versus saving context maximally. This was an attempt to strike that balance.
I think we could potentially make it configurable - ie. eca could send truly nothing, just the tool names, or the tool names + truncated descriptions; that being said, at least with my use cases this ended up being the "sweet spot".
stsquad commentedon Nov 3, 2026
I certainly wasn't seeing the truncated description but the whole of instructions which is more than a paragraph. I have submitted a PR on semcodes side which does work.
ericdallo commentedon Nov 3, 2026
I couldn't find anything to improve besides a configurable flag as mentioned, besides that seems like something to be fixed on semcode, LMK if you think we should prioritize the config flag