Back to catalog / Agent workflows
Query independent tools in parallel within one analysis turn
Let Claude query independent data sources together and synthesize results, avoiding serial waits.
Goal
Reduce latency for analyses that need multiple independent read-only facts.
Steps
- Identify independent query tools and define strict input/output schemas. [parallel]
- Configure
tool_choice={"type":"auto"}and inspect multipletool_useblocks in one assistant turn. [parallel] - Execute tools concurrently, return a
tool_resultpertool_use_id, and verify synthesis keeps sources distinct. [parallel]
How to verify
One turn contains multiple independent read calls; latency beats the serial baseline and results pair by call ID.
Troubleshooting
If the model chooses only one tool, the notebook suggests a batch meta-tool; still cap concurrency.
Permissions
Prerequisites
- Python, Anthropic SDK, an API key, and mock read-only tools.
Permissions
- Do not parallelize side-effecting tools; cap calls per turn and downstream rate.
Limitations
Parallelize only independent, idempotent calls; use a transaction or explicit ordering when those guarantees are required.
Pinned upstream source
- Repository
- anthropics/anthropic-cookbook
- File path
- tool_use/parallel_tools.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
Turn ecommerce campaign materials into a reviewable weekly brief