passdrill
AI & LLM Engineering · AI Agents & Tool Use · Card 027/032 hard

An agent has two tools: `check_inventory` and `charge_customer`. A checkout flow must always check inventory and confirm the item is in stock before it charges the customer for it -- charging first, or charging without checking, would be a serious bug. Given a user request that could plausibly trigger both tools, what does setting `tool_choice: {"type": "auto", "disable_parallel_tool_use": true}` help prevent, and what does it NOT by itself guarantee?

  1. It prevents Claude from requesting both tools together as simultaneous parallel calls within one turn -- so `charge_customer` cannot be issued in the same batch as `check_inventory` before that inventory result is even known -- but it does not by itself guarantee Claude will always call `check_inventory` before `charge_customer` across separate turns; the calling application's own logic still has to enforce that ordering
  2. It guarantees Claude will always call `check_inventory` before `charge_customer` in the correct order across every future turn, because the parameter itself encodes a dependency graph between the two named tools
  3. It prevents Claude from ever calling `charge_customer` under any circumstances, since disabling parallel tool use removes any tool involved in a financial action from consideration entirely
  4. It has no effect on tool-calling behavior at all and only changes how the response is formatted for logging purposes
Next card → Shuffle