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, runs the actual function, and passes the result back. 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]
When this happens repeatedly, you get the agentic loop: the model calls a tool, sees the output, and decides on the next call until the task is finished. That loop is the engine described on the AI agents page.
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