Optimizing Oversized MCP Tool Schemas

Anoop_kathait · reddit · 2026-07-11

The author encountered a specific issue with a self-hosted AI agent (Hermes Agent): even sending a simple "hi" included the full JSON schema of all enabled tools and MCP servers, causing input tokens to spike past 20,000.

Their mitigation strategies included:

They are also exploring two further optimizations: lazy-loading MCP tool schemas and automatically rotating multiple free API keys before failing over to another provider.

Related event: MCP Tool Schema Overload Impairs Agent Accuracy(3 posts)→

Original post →

More from coding & agent

coding & agent channel →