Tool Use (Function Calling)

The mechanism that lets a language model call external tools — APIs, databases, code, search — instead of only generating text.

Tool use — also called function calling — is how a language model reaches beyond text. The model is given a set of tools it may call, each with a name and typed parameters. When a request needs live data or a real action, the model emits a structured call; your code runs it and returns the result; the model reads that result and continues. That loop is what lets an AI look something up, send an email, or update a record.

This is the building block under most useful AI systems. An agent is essentially a model using tools in a loop until a goal is met, and MCP is an open standard for exposing those tools in a consistent, secure way. The model never touches your systems directly — it requests an action, and your code decides whether and how to carry it out.

Good tool design is mostly about clarity and limits: precise descriptions so the model picks the right tool, validated inputs, and permissions so it can only do what you allow. Done well, tool use is what turns a chatbot into something that gets work done — reliably and inside your guardrails.