Tool use
What you will learn Exactly how tool use is structured, and why it resolves most of the limits from the previous chapters.
The limits, restated
We listed four things a language model cannot do:
All four share one root. The model only knows what it has seen. It has no way to reach outside.
Tool use builds that passage.
The structure
You tell the model, alongside the question, a list of functions it may call.
Now the model can ask to call a tool instead of writing an answer.
graph TD
A["Person: how much A-1023 is left?"] --> B["Model"]
B -->|"check_stock('A-1023')"| C["The real system"]
C -->|"result: 47"| B
B --> D["Answer: there are 47 in stock"]The flow in detail
- A person asks
- The model judges — "this is a value I don't have; I should use check_stock"
- The model emits a tool call request:
check_stock("A-1023") - The system performs the actual execution (not the model)
- The result goes back to the model
- The model produces an answer incorporating the result
Remember step 4. The model only asks "please call this"; it does not execute. That is why you can insert human approval before execution. This is the point at which guardrails become possible.
What changes
| Without tools | With tools | |
|---|---|---|
| "How much stock is left?" | doesn't know (or invents) | the real value |
| "What's 237 × 481?" | a plausible number | the exact calculation |
| "What's today's exchange rate?" | doesn't know | a search result |
| "When will this order arrive?" | doesn't know | a lookup in the order system |
| Basis for the answer | none | you can see which tool it came from |
That last row matters most in practice. Once an answer has a basis, you can verify it. It is also why hallucination drops sharply — there is nothing to invent.
Tools do not only read
This is where their character diverges.
| Kind | Example | Risk |
|---|---|---|
| Read | stock lookup, document search, calculation | low. Nothing to undo if wrong |
| Write | send email, create an order, save a file | high. Hard to undo |
| Delete / pay | delete data, issue a refund | very high |
Attaching read tools and attaching write tools are completely different decisions. Read can generally be started safely; from write onwards, approval design has to go with it.
Start with read tools. They alone cut hallucination sharply and raise answer quality. Write comes after.
Deciding which tools you need
Write out the workflow and mark what has to be looked at in each step, and the tool list falls out.
Only step 4 is the model; the rest are tools. Most AI projects are one piece of judgement and a lot of plumbing.
Common misconceptions
"Once you attach tools, does AI handle everything?"
Tools only make things reachable. What to call and when is still the model's judgement, and that judgement can be wrong. It may call the wrong tool, or fail to call one it should have.
This gets worse as tools multiply, which is covered in tools and MCP.
"So more tools is better?"
No — often the opposite. With 200 tools the model struggles to pick the right one. People too pick the wrong tool more often from a bench holding 200 of them.
"Write tools are risky — better not to use them?"
Without write there is no automation. You attach them with approval points designed in. Put a human only in front of things that are hard to undo — "over the threshold needs approval," "external sends need approval."
Check yourself
1. Who performs the actual execution in a tool call? Why does it matter?
Answer
The system executes. The model only requests "please call this." That is why human approval can be inserted before execution, and it is the point at which guardrails become possible.
2. Why separate read tools from write tools?
Answer
Because reversibility differs. Read has nothing to undo when wrong, so it can be started safely; write (sending email, creating orders) and delete or payment are hard to undo, so approval design has to accompany them.
3. Why is attaching more tools not better?
Answer
As tools multiply the model struggles to pick the right one. With several similar tools available, the chance of calling the wrong one goes up.
With tools in hand, it can go and find material → Finding and attaching sources