Ask an AI assistant for today’s news, and it may search the web rather than rely on what it already knows. Tool usage is the ability to call external software or services, such as a search tool, calculator, file reader, or application programming interface (API), and use the returned result in a response. section 8.11
A language model can produce a structured tool call instead of ordinary prose. The tool runs, its result is placed back in the model’s context, and the model can then respond. Models may learn when and how to call tools through fine-tuning or through prompts that demonstrate tool use; a tool is not necessarily helpful for every request. section 8.11
Table 8.1 Sample API tool calls and output formats [49]
| API name |
Example input |
Example output |
| Question answering |
“Where was the Knights of Columbus founded?” |
“New Haven, Connecticut” |
| Wikipedia search |
“Fishing Reel Types” |
“Spin fishing > Spin fishing is distinguished between fly fishing and bait cast fishing by the type of rod and reel used. There are two types of reels used when spin fishing, the open-faced reel and the closed-faced reel.” |
| Calculator |
“27 + 4 * 2” |
“35” |
| Calendar |
(none) |
Today is Monday, June 30, 2025. |
| Machine translation |
“sûreté nucléaire” |
“nuclear safety” |
Sample inputs and outputs show the different kinds of results a tool can return, from a calculation or translation to a search excerpt. section 8.11
A question requiring several tools
To find the Google review rating of the highest-grossing restaurant location in an uploaded spreadsheet, an agent might read the file, analyze its sales figures, and then search for the current rating. A single tool call cannot complete that sequence. section 8.12
Longer tasks may require an agent to inspect one tool’s result before choosing its next action. That flexibility also creates risks: search results can mislead an answer, while access to email, files, or financial systems can turn a mistake into a consequential action. Malicious instructions hidden in retrieved content can redirect an agent. Limits on permitted actions, human approval, task evaluations, and adversarial testing help assess and contain these failures. section 8.12 section 8.16 section 8.20 section 10.22












