Tool use & MCP
What is tool use and how does a model call a function?
A language model only emits text on its own. Tool use hands it a menu of functions: the model proposes a structured call, your code runs the actual function, and the result comes back for the model to read.
A language model, by itself, only emits text. It cannot read your files, check the weather, or send an email. Tool use is what changes that, and MCP is the standard that makes tool use portable across models.
When you give a model tools, you hand it a menu. Each entry has a name, a description, and a schema for its arguments. OpenAI calls this function calling: you describe the functions, and the model can choose to emit a structured call to one of them.[1]
The key thing to understand is that the model never runs the tool. It produces a structured request that says, in effect, “call get_weather with city = Denver.” Your application receives that, validates the arguments against the tool’s schema, runs the actual function, and passes the result back as another message in the conversation. The model reads the result and continues. Anthropic’s tool-use documentation lays out exactly this exchange of a tool-call request followed by a tool result.[2] Nothing here requires the model to be right about the outcome before it acts — the schema constrains the shape of the call, not whether calling it was the correct move, which is why the tools an agent is handed matter as much as its prompting. See rules and guardrails.
When this exchange happens repeatedly — propose, run, read, propose again — you get the agentic loop: the model calls a tool, sees the output, and decides on the next call until the task is finished, or until it decides it needs a different tool altogether. That loop is the engine described on the AI agents page.
Tool use and MCP solve different halves of the same problem. Tool use is the mechanism: a schema, a call, a result. MCP is the distribution: a standard way to package that mechanism so one tool works with every MCP-aware model, instead of a bespoke integration per model. The next page covers why that distribution problem was worth solving.
Tool use & MCP: where to start
- Model Context Protocol ↗
The official spec, docs, and getting-started guides for MCP.
- MCP on GitHub ↗
Reference servers, SDKs, and the open governance of the protocol.
- OpenAI function calling ↗
The function-calling guide: how a model proposes a structured tool call.
- Anthropic tool use ↗
Claude's tool-use overview, including the request-and-result exchange.
References
- Function calling guide — OpenAI
- Tool use with Claude — Anthropic