Deferred tool loading avoids paying the context cost of every tool upfront. The agent starts with a search capability, discovers a relevant tool, and loads its definition just in time. section 9.5.1
Use the technique as a disciplined response to context pressure:
- Set a tool-definition budget before choosing an integration; 10% of the context window is offered as a reasonable ceiling. section 9.5.1
- Keep frequently used tools permanently available, and defer tools whose usage frequency does not justify a permanent context position. section 9.5.1
- Verify retrieval against the actual tool catalogue: independent testing found that search does not always surface the correct tool. section 9.5.1
Five servers, 58 tools
With five MCP servers and 58 visible tools, similar names caused wrong selections such as notification-send-user instead of notification-send-channel. Deferred loading reduced tool-definition tokens by 85% in reported testing; accuracy also rose from 49% to 74% on Opus 4 and from 79.5% to 88.1% on Opus 4.5, but retrieval still requires local validation. section 9.5.1
Table 9.6 Context Usage claude-sonnet-4-5
|
Source
|
Tokens
|
Share
|
|
System prompt
|
3,900 tokens
|
2%
|
|
MCP tools
|
58,400 tokens
|
29%
|
|
Memory files
|
1,200 tokens
|
1%
|
|
Messages
|
42,000 tokens
|
21%
|
|
Free space
|
94,500 tokens
|
47%
|
Use the context breakdown to see how MCP tool definitions can consume 29% of the available context before useful work begins. section 9.5.1
