Cost & Performance Intermediate
Minimize System Prompt Tokens
Reduce MCP overhead and context consumption to maximize the effective 200K window
Command
"color:#9CA3AF;font-style:italic"># Audit context usage: $ /context "color:#9CA3AF;font-style:italic"># Set ToolSearch threshold lower: $ ENABLE_TOOL_SEARCH=auto:5 "color:#7C5CFC">claude "color:#9CA3AF;font-style:italic"># Block unused MCP tools: $ "color:#7C5CFC">claude -p "Task" "color:#d97757">--disallowedTools "mcp__chrome-devtools__*"
Response
| Consumer | Typical Size | Notes | |--------------------|---------------|---------------------------| | System prompt | 5K-10K tokens | Auto-cached | | CLAUDE.md files | 1K-10K tokens | All .claude.md in hierarchy | | MCP tool descs | 10K-50K+ | Major cost if many MCPs | | Conversation | Grows/turn | Largest consumer | | Extended thinking | 10K+ per resp | Expensive at Opus rates |
Parsing Code
059669">">// ToolSearch defers loading MCP tool schemas until needed 059669">">// Without deferred loading: 80 tools = ~40K tokens upfront 059669">">// With ToolSearch: ~2K tokens until a tool is actually used 059669">">// 059669">">// Strategies: 059669">">// 1. Disable unused MCP servers 059669">">// 2. Lower ToolSearch threshold: ENABLE_TOOL_SEARCH=auto:5 // 3. --disallowedTools to exclude unneeded MCP tools
Gotchas
! MCP tools can consume 40K-50K tokens of context — shrinking effective window to ~150K
! ToolSearch defers loading until tools are needed — drops overhead from 40K to ~2K tokens