A developer analyzed their Cursor setup and found that the definitions for 209 MCP tools consumed approximately 882,846 tokens, with a significant portion of this being whitespace. By optimizing the tool definitions, such as compacting the formatting and switching to a name index that fetches full specs on demand, the token count was drastically reduced. This optimization, exemplified by a project called mcptoon, is most beneficial for users with a large number of tools, as a few heavily defined tools can account for a substantial portion of the token usage. AI
IMPACT Highlights potential for significant cost savings in LLM API calls through efficient tool definition management.
RANK_REASON Analysis of tool definition token costs within a specific software setup.
AI-generated summary · Google Gemini · from 1 sources. How we write summaries →