# 3.3 Progressive tool disclosure

Deferred schemas are discovered by tool search and loaded just in time.

1. Eager loading: all schemas saturate the prefix.
2. defer_loading: only the tool_search meta-tool stays.
3. tool_search retrieves the top-k relevant schemas.
4. Just-in-time loading: k schemas enter context.

- **Use when:** Large tool catalogs or several MCP servers.
- **Avoid:** Hot-path tools: keep them eager to skip the discovery hop.

```
tools = [
    { type: "tool_search" },                    # always loaded
    { name: "refund_order", defer_loading: True, ... },
    { name: "find_order",   defer_loading: True, ... },
    # ...dozens more, all deferred
]

# model:  tool_search("refund an order")
# result: refund_order, find_order  -> now loaded
```

## References

- [Introducing advanced tool use](https://www.anthropic.com/engineering/advanced-tool-use) (Anthropic)
- [Tool search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-search-tool) (Anthropic)
- [Code Mode: an entire API in 1,000 tokens](https://blog.cloudflare.com/code-mode-mcp/) (Cloudflare)
- [Writing effective tools for AI agents](https://www.anthropic.com/engineering/writing-tools-for-agents) (Anthropic)
