Back to feed
Dev.to
Dev.to
6/6/2026
The Meta-Tool Pattern: Teaching Your Agent to Discover Its Own Tools

The Meta-Tool Pattern: Teaching Your Agent to Discover Its Own Tools

Short summary

MCP setups with 100+ tools burn 100–200k tokens at session start, blocking conversation history and reasoning. A two-meta-tool proxy (discover_tools + call_tool) replaces individual tool schemas, achieving 98–99% token reduction and cutting costs from $270/month to $3/month via on-demand discovery. The pattern uses BM25 search with synonym expansion and works for deployments exceeding 50 tools or single-tool schemas over 2,000 tokens.

  • Two meta-tools (discover_tools, call_tool) replace 100+ individual tool schemas with 98–99% token reduction
  • On-demand tool discovery via BM25 + synonym mapping instead of loading all schemas at session start
  • Cost reduction from $270/month to $3/month; build proxy if tools exceed 50 or schema size exceeds 2,000 tokens

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Explore more