Tool Use / Function Calling

The ability for AI to call external tools - turning a text generator into an agent that takes real actions.

The simple explanation

A language model on its own can only read text and produce text. Tool use is what gives it hands. When an AI model has tool use capabilities, it can call functions - run a shell command, read a file, search a codebase, make an API request, or write to disk.

Think of it like the difference between a brain in a jar and a person with hands. The brain might be brilliant, but without the ability to interact with the world, it can only think and talk. Tool use gives the AI the ability to do things.

Here's what the flow looks like: the model receives a task, decides it needs to read a file, outputs a structured "tool call" (like read_file("src/app.ts")), the system executes that call and feeds the result back, and the model continues reasoning with the new information. This loop of thinking, calling tools, and processing results is what makes agents work.

Why it matters for agentic engineering

Tool use is the dividing line between AI-assisted coding and agentic coding. Without it, you're copying and pasting between a chat window and your editor. With it, the AI can operate directly on your codebase.

The tools available to an agent define what it can do. An agent with access to file read/write, shell execution, and web search can handle far more complex tasks than one that can only generate text. This is why protocols like MCP matter - they standardize how agents connect to new tools.

In practice

Common tools that coding agents use:

The quality of an agent's tool implementations matters enormously. A "write file" tool that replaces entire files is much clumsier than one that does surgical edits. A "search" tool with semantic understanding finds better results than raw grep. Better tools = better agents.