A tool call is how a language model does something instead of only saying something. Until tool calls existed, a model had exactly one ability: write text back to you. Now it can send the email or query the database, and it does that through an API. Some model providers call this function calling in their documentation. Same mechanism, different word.
How a tool call works, step by step
Every message you send forces one decision. The model either answers in text, or it calls a tool. Ask it what a heat pump swap involves and it writes text. Ask it to book a meeting with Sarah tomorrow at 2pm and it recognises an action.
- You ask. “Book a meeting with Sarah tomorrow at 2pm.”
- The model picks the tool. Out of everything it has been given, it selects the one that creates a calendar event.
- The model fills in the details. The tool says what it needs: a date, an attendee, and other fields on top of those. Some are required, some optional. Here that is tomorrow, 2pm, Sarah.
- The call goes out over the API. Then the model comes back to you and says it has done it.
Tool calls have a strict format. That is why the model has to be told how each one is shaped before it ever sees your first message.
Where does an AI agent get its tools?
They sit in the system prompt. Before you type anything at the start of a chat, the model has already been handed the list and the instructions for using each item on it: send an email, query a database, search the web.
Tools usually arrive in bundles. Gmail has an MCP, which is a single connection carrying a set of related tool calls: search the inbox and send from it.
Strip the tools out and you still have something useful, only it never leaves the chat window. It will draft the notice to the tenant and summarise your notes. It will not send anything or change a record. ChatGPT uses tool calls inside its own interface, and if you run a CRM or some proprietary system of your own, you can hand it those too.
How does a coding agent use tool calls?
A coding agent does not look like a calendar booking. The mechanism is identical. Only the query is more complex.
Tell it to implement a dashboard. It looks up your codebase, which is one tool call. It works out where in the codebase the dashboard belongs. It decides what the colours should be, finds the separate file the colours live in, and writes to that file, which is another tool call. Between each step it asks itself whether the goal is finished, and if it is not, it keeps working, and that loop of thinking and working is the reasoning.
How many tools should one agent have?
Fewer than you would guess, and split across several agents rather than piled into one. There are two ways to get this wrong and they pull in opposite directions.
Give an agent too few tools and it does not have the resources to finish the task. Give it too many and it gets confused by everything it could do. The second failure costs you twice over. We went through the mechanics of this in the context window lesson: every tool description is loaded into the window before your first message, so tools the agent never touches still burn window and tokens on work it was never asked to do.
| What goes wrong | What it costs you | |
|---|---|---|
| Too few tools | The agent runs out of resources partway through the job | The task does not finish |
| Too many tools | The agent gets confused about which of the options to use | Window and tokens spent describing tools it never calls |
So split agents by job. We build agents day to day, and a finance agent never gets the CRM tool calls. A sales agent never gets the finance tool calls. Each one gets the narrow set that matches the work it was hired for, which is the opposite of how most people start, handing one assistant everything and hoping it picks well.
Think about a junior employee on day one. Hand them 20 different resources and 20 different things they could be doing, and it will be a long time before any of it turns into value. Give them one job and only the tools that job needs, and they can get on with it. That narrowing is what the rest of this track builds towards: what an AI agent is, and how you scope one to a real job in your organisation.