passdrill
AI & LLM Engineering · AI Agents & Tool Use · Card 013/022 easy

A research assistant is given two independent, read-only tools, `get_stock_price` and `get_weather`. Given a user question that needs both pieces of information, Claude's response comes back as a single assistant turn containing two separate `tool_use` content blocks, one for each tool, rather than one tool call followed by a second turn requesting the next. According to Claude's tool-use API, what must the calling application do before sending the next request to Claude?

  1. Execute only the first tool_use block, since Claude's API silently discards any additional tool_use blocks appearing in the same assistant turn
  2. Merge both tool_use blocks' arguments into a single combined tool call before executing anything, since the API does not allow two separate tools to be invoked from one turn
  3. Execute both tool calls, in whichever order or concurrency suits the tools since the API does not prescribe an order, then return one tool_result block for each tool_use block, all together in the next message, each matched to its call by the tool_use_id
  4. Wait for a separate follow-up request from Claude naming the second tool before running the get_weather call, since only one tool result can be returned per message
Next card → Shuffle