Free preview9 min

What Is Tool Use?

Reviewed by Human · Updated November 4, 2026

You asked a model for today's weather and it answered. It never checked. What actually happened is stranger than an API call — and the mechanism behind it is the whole game for agent prompting.

The model returned a weather report. Which part of the system actually contacted the weather service?

What Is Tool Use in an LLM?

**Tool use**: a pattern where the model, instead of answering directly, emits a structured call to a named external function that your own code then executes. **Function calling**: the same mechanism, named for the fact that the model outputs a function name plus arguments matching a declared schema. **Tool schema**: a machine-readable description — usually JSON Schema — of a tool's name, purpose, and parameters, passed into the prompt so the model knows what it may call. Three components make one loop: (1) you declare tools in the prompt; (2) the model chooses one and emits arguments; (3) your runtime executes it and returns the result for the next turn. Break any link and the loop stops.

The model never runs code. It proposes; your runtime disposes.

Real world

A restaurant expediter doesn't cook. They read the ticket, decide which station handles it — grill, fry, pastry — route it, then plate whatever comes back.

AI parallel

The model is the expediter. Your tools are the stations. The prompt is the menu that tells the expediter which stations exist and exactly what each one can make.

The AI never called the API.

Every 'the AI looked it up' moment is really: model emits a request, your code executes it, the result returns to the model. Delete your execution layer and every tool call becomes an unfulfilled intention. The intelligence is in choosing the tool and its arguments — not in running it.

Your turn

Below is a one-line user request. Play the role of the model: write the single tool call you'd want it to emit — tool name plus arguments. Don't answer the question; route it.

Reflect

Did you fill every argument from the user's words alone? Any value you had to imagine is a value a real model would hallucinate.

end of module

You've finished this module.

Mark it complete to earn your XP and keep your streak alive.

Progress saved locally · Sign up to earn XP