Match each tool-invocation mechanism to its defining characteristic
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.
Detailed answer & concept explanation~8 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
Lay out the four mechanisms on a flexibility to reliability spectrum, contrast ReAct text parsing with schema-validated function calling, explain how constrained decoding makes structured calls reliable, and finish by positioning MCP as an orthogonal transport standard that solves provider lock-in rather than competing as an output format.
| 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.
- LangGraph and the OpenAI Agents SDK default to provider function calling, while older LangChain ReAct agents still parse Action and Observation text for models lacking a tool API.
- Libraries like Outlines and llama.cpp grammars implement constrained decoding, masking logits so a local Llama 4 deployment emits only schema-valid JSON tool calls.
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?
QIf you must support both OpenAI and Anthropic models behind one agent, how do you abstract over their tool formats?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes 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.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.