Drag each answer to line up with its matching prompt
OpenAI function calling
Model emits a tool_use content block; the API enforces schema conformance before returning
Anthropic tool use
Model outputs a structured JSON object with function name and arguments; parsing is provider side
ReAct free form text
Transport + schema layer that lets tools run out of process and remain provider agnostic
Model Context Protocol (MCP)
Model writes Action: <name>(<args>) in natural language; the runtime parses the string
Tool calling spans a spectrum: ReAct parses free text (flexible, brittle), provider function calling returns validated JSON (reliable, locked in), and MCP standardises transport across providers.
Imagine giving a worker a list of jobs they can ask you to do. There are a few ways they can hand you the request. They could scribble it on a sticky note in their own words, and you have to read the handwriting and guess what they meant. That is the free-text way: easy to write, easy to misread. Or you could give them a printed form with labelled boxes to fill in, so you always know exactly what each field means. That is the structured way: harder to write but never ambiguous. There is also a universal courier service that carries those forms between any office and any worker, no matter who built them. That courier is the standard protocol. The forms make the request reliable; the courier makes it work everywhere.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
When an agent decides to use a tool, that decision has to cross a boundary from the model into running code. The model produces tokens. The runtime executes functions. Something has to translate the model's intent into a concrete call with a name and arguments. The format of that crossing is one of the most consequential design choices in an agent runtime, because it determines how often a tool call fails to parse, how tightly you are coupled to one model vendor, and where your tools physically run.
Four mechanisms dominate the landscape, and they are not four points on one line. Three of them, ReAct free-form text, OpenAI function calling, and Anthropic tool use, are competing output formats that sit on a reliability versus flexibility spectrum. The fourth, the Model Context Protocol, lives on a separate axis. It standardises transport and discovery so that tools become portable across providers. Understanding why these are different axes is the heart of the question.
The historical arc explains the design space. ReAct came first and proved that a plain completion model could act in the world. Native function calling followed and traded universality for reliability. MCP arrived most recently to tackle a problem the first three never addressed, which is making a single tool implementation work across every model and application. Each step solved a real pain left by the previous one.
ReAct free-form text: maximum flexibility, minimum reliability
The ReAct pattern was the first widely used way to give a language model tools. The idea is elegant. You prompt the model to interleave reasoning and actions, and it emits an action as plain text, something like Action: search("current weather in Paris") followed by an Observation: line your runtime fills in.
The appeal is universality. ReAct needs no special API. It works on any completion model that can follow a format instruction, including older or open base models with no tool-calling support. For prototyping, it is the fastest path to a working loop.
The weakness is that your runtime owns the parsing. You write a regex or a small parser to pull the tool name and arguments out of free text. Models drift. They wrap the action in a code fence, rename an argument, add a stray quote, or hallucinate a tool that does not exist. Every one of those becomes a parse failure you must detect and recover from.
There is a second cost that is easy to miss. Because the action lives inside the model's free text, you usually cannot validate argument types until after the model has already spent the tokens to produce them. A bad call is only caught downstream, which means a wasted generation and a retry. The reasoning trace that ReAct interleaves is genuinely useful for accuracy on hard tasks, but the unstructured action format is the part that breaks. In production at scale, this brittleness is why text parsing has largely given way to structured calling, while the interleaved-reasoning idea survives inside the structured formats.
Situations where this technique stops working.
2–4 min · Everything important, quickly.
| Mechanism | Output format | Who parses | Reliability | Portability |
|---|---|---|---|---|
| ReAct free-form text | Natural-language action line | Your runtime | Low, brittle string parsing | High, any model |
| OpenAI function calling | JSON arguments object | Provider | High, schema validated | Low, OpenAI format |
| Anthropic tool use | tool_use content block | Provider | High, schema validated | Low, Anthropic format |
| MCP | JSON-RPC over transport | MCP client library | High, typed contract | High, provider agnostic |
Real products, models, and research that use this idea.
- Claude Opus 4.7 and GPT-5.5 both expose native structured tool calling, returning a validated tool_use block or JSON arguments object rather than free text for the runtime to parse.
- Anthropic's Model Context Protocol now ships with Claude Desktop, Cursor, and the OpenAI Agents SDK, letting a single tool server work across multiple model providers.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow does constrained or grammar-guided decoding actually enforce a valid tool-call schema at the token level?
Explain that a grammar or finite-state machine masks the logits at each step so only tokens that keep the output schema-valid can be sampled. Contrast this with post-hoc validation, which can only reject after the fact and forces a retry.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Treating all four as interchangeable formats. They sit on a reliability vs flexibility spectrum, and MCP is a transport standard, not a competing output format like the others.
60 second bullets to scan on the way to the call.
Place all four mechanisms on the flexibility versus reliability spectrum.
Explain why ReAct text parsing is brittle in production.
Primary sources. Browse if you want the original framing.
Same topic, related formats. Practice these next.