Claude Certified Architect – Foundations Practice Question 19: Parallel Tool Results

Claude Certified Architect, Foundations · Test 2 · question 9 of 10

Tool Design & MCP Integrationhard

A developer's agent loop works when Claude requests one tool at a time. When Claude returns an assistant message with three tool_use blocks (weather for three cities), the loop executes each tool and appends a separate user message containing one tool_result block per call. After that, Claude stops calling tools in parallel and sometimes gives wrong answers, or the API rejects the request. What change fixes the loop?

Select one answer
Show answer and explanation

Answer:

  • A. Collect all three results and send them in one user message made up of the tool_result blocks, each matched by tool_use_id, with no text placed before them

A is correct. When Claude makes parallel tool calls, all tool_result blocks must be returned in a single user message, each matched to its call by tool_use_id, and every tool_result must come before any text content in that message. Sending results in separate user messages teaches the model that parallel calls are not expected, which reduces future parallel use and can cause errors.

B is wrong because tool results are always sent in the user role; assistant messages are Claude's turns. C is wrong because it only hides the symptom by giving up parallelism while leaving the malformed layout in place. D is wrong because each tool_use block needs its own tool_result with the matching ID; merging them leaves two calls unanswered and the request is invalid.

Reference: Parallel tool use

Practice Test 2 ›

Study guides for Claude Certified Architect, Foundations