WTF is Tool Use?
A model's ability to call external functions (APIs, code, search) instead of only producing text.
Also called: function calling, tool calling
TL;DR
A plain LLM can only talk. With tool use, you describe functions to the model, and it can reply with "call get_weather(city='Pune')". Your code runs the function and sends the result back. This is the basic building block that turns a chatbot into an agent.
How it works
You pass the model a list of tool definitions, each with a name, a description and a JSON Schema for its parameters. The model returns a structured tool-call block instead of (or alongside) text. Your application executes the call, appends the result as a tool-result message, and calls the model again. The model never executes anything itself; tool descriptions are effectively part of the prompt, so writing them well matters a lot.
Example
{
"name": "get_weather",
"description": "Get current weather for a city",
"input_schema": {
"type": "object",
"properties": {
"city": { "type": "string" }
},
"required": ["city"]
}
}Origin
- Coined / introduced by
- Research + API vendors
- When
- 2023
- Story
- Explored in research such as Toolformer (Feb 2023); became a standard API feature across vendors from mid-2023.