Forward-deployed / Learning zone
Tool callinga Generative AI module
Lesson 01

What tool calling is

TL;DR

A model, on its own, produces only text. Tool calling is the mechanism that lets it describe an action it wants taken — "call this function, with these arguments" — instead of just describing the answer. Your code, not the model, decides whether that request actually happens. This single distinction is the whole idea: the model proposes, your system disposes. Every capability people mean when they say an AI "does things" — looks something up, sends a message, books a meeting, moves money — is built on this one mechanism, and every safeguard that keeps an AI product from doing something dangerous attaches at the moment your system decides whether to honor the request.

🎯 For the product leader

Why it matters — This is the line in your product where a wrong output stops being an embarrassment and starts being an incident. A wrong sentence is a bad reply; a wrong tool call is a real-world action.

What it changes in your decisions — Which actions you're willing to let a model request at all, and which of those you let happen automatically versus behind a human confirmation.

Ask yourself — "For this feature, if the model asked to do something we didn't expect, what actually stops it from happening?"

Risk if ignored — A team ships a "the model executes the tool" mental model instead of "the model requests, we decide," and discovers the difference the first time a hallucinated request reaches something it shouldn't have.

The mental model: a request, not a command

The sequence

Model → Harness → Tool · every control lives in the middle lane

Two easy-to-lose truths: the model never touches the tool, and every control has exactly one place to live.

Model
proposes
Your harness
enforces
Tool
acts
"I'd like to call send_email(to=..., body=...)"
Validate the request · check permissions
Execute · only if it passed
Result · or a rejection
Result fed back into context
Next request · or a final answer
Where every control lives: allowlist, spend cap, rate limit, approval step, log entry — all sit in the harness's validation step. A model with tools is never more careful than the system between it and the tool.

Two things are easy to lose sight of once tool calling feels routine. First, the model never touches the tool directly — it only ever produces a structured description of what it wants to happen next. Second, every control you will ever want to add — an allowlist, a spend cap, a rate limit, an approval step, a log entry — has exactly one place to live: the step where your system turns that description into an action. A model with tools is never more careful than the system standing between it and the tool.

Why this is the line where risk multiplies

Before tool calling, the worst a wrong output can do is mislead someone who reads it. A wrong sentence can be embarrassing, but it doesn't spend money, delete a record, or email the wrong customer by itself. Once a model can request actions, a wrong output can cause a wrong effect, and effects are harder to take back than sentences. This is why tool calling is the point in an AI product's design where the conversation has to shift from "is the answer good" to "what's the worst realistic thing this request could cause, and would we survive it."

What actually counts as a tool

The range is wider than "call an internal API." It includes retrieval and search, code execution in a sandbox, file and document operations, business APIs (a CRM, a calendar, a payments system), and — at the fragile end — computer or browser use, where the model drives a real interface by looking at the screen. All of them share the same shape: the model requests, something else decides whether to comply, and something else again carries it out. The full craft of choosing, describing, and running tools well — including the MCP standard that made tools portable across vendors — is developed in Tools & function calling.

Failure modes

Practitioner checklist