Flashcard: what does it mean when an LLM 'makes a tool call'?
A tool call is the model emitting structured JSON naming a tool and arguments instead of returning final text; the runtime parses and executes it, then feeds the result back.
Imagine asking a friend to fix your laptop. Instead of fixing it themselves, they hand you a sticky note that says 'open the lid, press F2 at boot.' They have not done anything yet. They have just written down very specific instructions on a small piece of paper. You take the note, follow the instructions, and tell them what happened. Then they write another note. A tool call is exactly that sticky note. The language model writes a tiny, very structured note that says 'please call the search tool with this query' or 'please run this Python code.' Nothing has actually run yet. The runtime around the model takes the note, follows the instructions, and writes back what happened so the model can decide the next step.
Detailed answer & concept explanation~6 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
5 min: define a tool call as structured JSON output, walk through what the API returns (name, id, arguments), explain the runtime side (parse, validate, execute, return), contrast against a final-answer response, and note parallel calls and validation-error recovery.
Real products, models, and research that use this idea.
- Anthropic's API returns a tool_use block (type, id, name, input) when Claude decides to use a tool; your code executes the tool and sends back a tool_result block with the matching id.
- OpenAI's responses API returns a tool_calls array; the SDK helpers parse the JSON arguments, but it is still your code that runs the actual function.
- Cursor's agent receives a tool_use for edit_file with a path and diff; the editor applies the diff and feeds back the new file content as the observation.
- LangGraph's tool node consumes a parsed tool call from the model node, dispatches to the registered function, and emits the observation as the next state update.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow does the runtime match a tool call request to the tool result it sends back?
QWhat happens if the model emits arguments that fail schema validation?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Thinking the LLM directly invokes the function. The model only emits a structured request; an HTTP call, a file write, or a code execution only happens when the runtime parses that request and acts on it.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.