Tool Use & Function Calling
Defining tools, the tool-use loop, handling tool results, and designing reliable tool schemas.
Before you start
- 018 multiple-choice questions, one correct answer each.
- 02Suggested time 10 minutes. The timer is a guide, not a cutoff.
- 03Use keys 1–4 to answer, arrows to move.
- 04You get a full explanation for every question at the end.
Study guide
Every question in the Tool Use & Function Calling test, with the correct answer and a full explanation. Defining tools, the tool-use loop, handling tool results, and designing reliable tool schemas. Use it to review before or after taking the timed quiz above — the answers are revealed here, so take the quiz first if you want an honest score.
Show all 8questions, answers & explanations
- TU-01 · Question 1 of 8
When the model decides to call a tool, what `stop_reason` do you typically receive?
- Aend_turn
- Btool_use Correct answer
- Cmax_tokens
- Dpause_turn
Why: A `tool_use` stop reason signals the model wants you to execute a tool. You run it, then send the result back in a follow-up `user` turn as a `tool_result` block.
- TU-02 · Question 2 of 8
After executing a tool the model requested, how do you return the output?
- AAs a new `system` prompt
- BAs a `tool_result` content block in a `user` message, referencing the `tool_use_id` Correct answer
- CAs an `assistant` message
- DBy starting an entirely new conversation
Why: Tool output is returned in a `user` turn containing a `tool_result` block whose `tool_use_id` matches the model's `tool_use` request. The model then continues with that result in context.
- TU-03 · Question 3 of 8
What defines the inputs a tool accepts?
- AA free-text description only
- BA JSON Schema in the tool's `input_schema` Correct answer
- CA Python type hint
- DThe order of parameters in the system prompt
Why: Each tool declares an `input_schema` (JSON Schema). A precise schema with descriptions and required fields is what lets the model produce well-formed tool calls.
- TU-04 · Question 4 of 8
Which tool description practice most improves correct tool selection?
- AKeep descriptions as short as possible
- BWrite detailed descriptions covering what the tool does and when to use it Correct answer
- COmit descriptions and rely on the tool name
- DUse identical descriptions for similar tools
Why: Thorough, unambiguous descriptions — purpose, when to use it, what each parameter means — are the single biggest lever on whether the model picks the right tool with the right arguments.
- TU-05 · Question 5 of 8
A tool execution fails. What is the recommended way to inform the model?
- ASilently drop the result
- BReturn a `tool_result` with `is_error: true` and an error message Correct answer
- CThrow an exception and stop the conversation
- DResend the original request unchanged
Why: Return the failure as a `tool_result` with `is_error: true` and a useful message. The model can then retry, adjust arguments, or explain the failure to the user gracefully.
- TU-06 · Question 6 of 8
The model returns a `tool_use` block alongside some text. What does the `tool_use` block contain that you need to act on it?
- AOnly the tool name
- BA unique `id`, the tool `name`, and an `input` object with the arguments Correct answer
- CThe full conversation history
- DThe model's confidence score
Why: A `tool_use` block carries a unique `id`, the `name` of the tool to run, and an `input` object holding the arguments. You execute the tool with that input and return a matching `tool_result` referencing the same `id`.
- TU-07 · Question 7 of 8
You want the model to call a tool only when truly needed and otherwise answer directly. Which control expresses that?
- ASetting `tool_choice` to `auto` Correct answer
- BSetting `tool_choice` to force a specific tool every turn
- CRemoving the tool definitions
- DLowering `temperature` to 0
Why: `tool_choice: auto` lets the model decide whether to call a tool or respond directly. Forcing a tool makes it call one every time; that is useful for structured extraction but wrong when the model should sometimes just answer.
- TU-08 · Question 8 of 8
The model requests two tools in a single turn. How should you respond?
- APick one tool result and ignore the other
- BSend both `tool_result` blocks in the next `user` turn, each referencing its `tool_use_id` Correct answer
- CStart a new conversation for the second tool
- DReturn them in two separate `assistant` messages
Why: When the model emits multiple `tool_use` blocks in one turn, you execute each and return all corresponding `tool_result` blocks together in the following `user` message, each keyed to its `tool_use_id`. Omitting one leaves the turn incomplete.