The short version
- A tool is a function the model can ask the system to run, such as “look up order status”.
- The model does not run anything itself. It writes a request, and your software decides whether to run it.
- Design tools like products: clear names, narrow permissions, and safe behavior when the model gets it wrong.
The idea
Function calling, also called tool use, works in a loop. You describe the available tools to the model: each tool’s name, what it does and what inputs it needs. When the model decides a tool would help, it returns a structured request and not a final answer. Your code validates the request, runs the function and returns the result. The model then continues.
Tools fall into two groups. Read tools fetch information, such as a search or a record lookup. Write tools change something: they create an order, send an email or update a price. Write tools carry real risk and need tighter control.
Picture a new assistant who cannot touch any system. They hand you a slip that says “please look up order 5521”. You check the slip, do the lookup and hand back the result. The assistant never has the keys. You do.
- Model asks for a tool
- Software checks the request
- Tool runs
- Result returns to the model
- Model continues
Good tool design matters more than most teams expect. The model chooses tools by reading their descriptions, so a vague description causes wrong choices. A tool that returns 10,000 rows floods the context. An error message that says only “failed” teaches the model nothing.
An example
A customer service assistant has three tools: get order status, get tracking details and create a return request. The first two are read-only and run freely. The third changes data, so it requires an order number that belongs to the signed-in customer, it works only inside the return window, and above a set value it creates a draft for a person to approve. When a tool fails, it returns a message the model can act on, such as “order not found, ask the customer to confirm the number”.
Common mistakes
- One broad tool, such as “run any database query”, in place of narrow ones.
- Tool descriptions written for engineers and not for the model.
- Giving the model the user’s full permissions, or more.
- No limit on how many times a tool can be called.
What to do this week
- List the tools your assistant has. Mark each as read or write.
- For every write tool, write down who approves and what the limit is.
- Read each tool description aloud. If a new employee would be confused, so is the model.
The terms, in plain language
| Term | What it means |
|---|---|
| Tool | A function the model can ask the system to run |
| Function calling | The model returning a structured request to run a tool |
| Read tool | A tool that only fetches information |
| Write tool | A tool that changes data or takes an action |
| Least privilege | Giving only the access the task needs |
Further reading
Shorter articles and updates filed under this section, newest first.
Section 5.2 of the AI Engineering Guide · Last reviewed November 2026




