What it is
Tool use, also called function calling, lets an AI model do more than write text. The developer describes a set of tools to the model, such as "search the web," "read this file," or "look up an order." When the model decides one would help, it does not run the tool itself. It outputs a structured request naming the tool and its inputs. The software around the model runs the tool and hands the result back.
A useful picture is a chef who cannot leave the kitchen. The chef writes an order for the shopping assistant, the assistant fetches the ingredients, and the chef keeps cooking with what arrives.
How it works
A typical exchange goes like this:
- The app sends your message to the model along with descriptions of the available tools.
- The model replies with a tool call, for example a search query, instead of a final answer.
- The app checks the request, runs the tool, and returns the output to the model.
- The model reads the output and either calls another tool or writes its answer.
Repeat that loop many times with a goal attached and you have an AI agent. The code that runs the loop and executes the calls is the agent harness. Standards such as the Model Context Protocol exist so a tool built once can be used by many different models and apps.
Why it matters
Tools are how models touch the real world. They fix things models are bad at on their own, like exact arithmetic, current facts, and anything that needs your data. Retrieving documents for an answer, as in retrieval-augmented generation, is one kind of tool use. Writing to a calendar, sending an email, or editing code are others.
That power is also the risk. A tool call can change something, spend money, or leak data. Good setups limit what each tool can do, ask for approval on risky actions, and run inside an agent sandbox. Text a tool returns can contain hidden instructions, which is the route for prompt injection.
What to look for
When you judge a product that claims tool use, ask which tools it has, what each one is allowed to do, who approves actions, and whether you can see a log of every call. A model that picks the right tool and fills in the inputs correctly is doing real work. One that guesses wrongly can fail quietly, so the log matters more than the final answer.