In a multi-agent research pipeline, an orchestrator spawns three parallel subagents to research different sections of a topic. Each subagent uses a tool that calls a web search API. After all three complete, the orchestrator must synthesize results. The orchestrator sends tool results from all three subagents in a single synthesis request. What is the correct format for passing multiple tool results from parallel tool calls in a single API request?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Here's the deal — b is correct because the Anthropic API supports returning multiple tool results in parallel by including multiple tool_result content blocks in a single user message turn. Each tool_result must reference the tool_use_id of the corresponding tool_use block in the prior assistant message.
Full explanation below image
Full Explanation
B is correct because the Anthropic API supports returning multiple tool results in parallel by including multiple tool_result content blocks in a single user message turn. Each tool_result must reference the tool_use_id of the corresponding tool_use block in the prior assistant message. This is the documented pattern for resolving parallel tool calls. C is wrong because sending three sequential API requests does not match the parallel tool call pattern; it creates three separate conversation branches that cannot be easily synthesized and does not use the correct protocol for returning tool results to the model. A is wrong because wrapping multiple results in a single tool_result block with a JSON array is not the API specification; tool_result blocks are per-tool, not aggregated. B is wrong because placing tool results in an assistant message prefill conflates roles; tool_result is a user-role content block, not an assistant-role block, and this approach violates the turn structure.