Tool selection is the model’s decision about whether a tool is necessary and which available tool best fits the request. Providing many tools increases context and makes incorrect choices more frequent; assigning focused tools to specialist agents reduces that confusion. section 9.1 section 3.2.1
A tool-selection cycle proceeds through a host-controlled feedback loop:
- Provide the model with tool definitions, including names, descriptions, parameter schemas, and allowed values. section 3.2.1
- Let the model answer directly when its existing knowledge is sufficient, or generate a tool call with a function name and arguments when computation or another action is needed. section 3.2.1
- Extract the requested function and parse its arguments, then execute the function in the host system because the model cannot run code itself. section 3.2.1
- Append the assistant’s call and the tool result to the conversation, then send the updated message history back for the final response. section 3.2.1
Direct answer or calculator call
With a calculator tool available, “What’s the capital of South Korea?” produces a plain-text answer and no tool call. “What is 1234 x 5678?” produces a calculator call with the multiply operator and operands 1234 and 5678; after execution, the final response is “1234 × 5678 = 7,006,652.”
Figure 3.3 Key steps in tool calling: tool definition, delivery, and LLM tool selection
Use the execution-flow diagram to trace tool definition, delivery, model selection, host execution, and result feedback. section 3.2.1

