← Glossary / 61 of 100

n. / Agents and tools

Tool use

Definition

Tool use is a model's ability to ask for an external function to be run, such as a search, calculation or API call, and then continue with the result. The model asks; your code actually runs the tool.

In more detail

Each tool is described to the model by name, purpose and parameters. The model replies with the tool it wants and the arguments, your code executes it, and the result goes back into the next call. Most agent failures involve this exchange: the wrong tool, wrong arguments or a result the model misreads.

Example

The model replies with get_weather({"city": "Oslo"}). Your code calls a weather API and sends back "4°C, light rain" for the model to use in its answer.

Definitions are the start.

Open a real trace and watch these terms move.