Back to catalog / Agent workflows
Load large tool catalogs only when needed
Reduce prompt overhead by starting with a tool-description lookup and loading only the selected tool definitions.
Goal
Reduce prompt overhead by starting with a tool-description lookup and loading only the selected tool definitions.
Steps
- Start each request with a
describe_toollookup and a compact list of available tool names. [source04] - When selected, return a
tool_referenceand append that definition withdefer_loading=Trueto the active tool list. [source04] - Keep a per-request
loaded_toolsset and test that a second lookup does not duplicate definitions or alter unrelated tools. [source04]
How to verify
Request the same deferred tool twice; confirm its definition appears once in the active request and unrelated tool schemas remain byte-for-byte unchanged.
Troubleshooting
If the prompt grows with duplicate definitions, deduplicate by stable tool name in the per-request loaded_tools set and reset that set for the next request.
Permissions
Prerequisites
- Anthropic API key and a reviewed tool registry; tool definitions must be safe to disclose to the model.
Permissions
- Use approved test or anonymized data only; scope credentials to each workflow, and require explicit approval for external writes.
Limitations
Model output may be incomplete or wrong; API and beta behavior can change, so verify against the pinned source and current service behavior.
Pinned upstream source
- Repository
- anthropics/anthropic-cookbook
- File path
- tool_use/tool_search_alternate_approaches.ipynb
- Pinned commit
9c1e493ddd2b82df399d2a61b9c806c539e18be6- Source checked
- 2026-10-14 · Reviewed against the pinned upstream source
Repository metrics
These values describe the upstream repository, not popularity or likes for an individual skill or playbook.
- Stars
- Not collected
- Forks
- Not collected
- Observed at
- Not collected
No metrics snapshot is available yet.
License: MIT
Main topic
Take a coding Agent change from context to verification