HasMCP's Substack
DeepDive
MCP - Context Bloating?
0:00
-21:07

MCP - Context Bloating?

Innovative solution to prevent context bloating for your remote/stdio MCP Server with dynamic tool discovery and wrapper pattern. Reduce more than 95% context usage on 50+ tools instantly.

HasMCP’s Dynamic Tool Discovery implements a “Wrapper Pattern.” Instead of exposing every tool directly, the server hides its entire toolset and exposes only three standard discovery tools:

searchTools: Allows the agent to search for relevant tools or toolkits using BM25 (relevance) or Regex (pattern) search.

getToolDefinition: Fetches the full JSON schema for a single specific tool only when the agent decides to use it.

useTool: Executes a tool by name and arguments.

Discussion about this episode

User's avatar

Ready for more?