Zenaique

Match each tool invocation mechanism to its defining characteristic

Match pairs·Medium·4.0 · 0·~2 min·Asked atDeloitteOpenAIWeaviate·Relevant atAnthropicLangChain
Attempt it

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

TL;DR

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.

Memory aid
Sign in to see the mnemonic that makes this stick.
Easy to grasp

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.

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.

Provider function calling: structured, validated, vendor coupled
Constrained decoding: why structured calls are reliable
MCP: a different axis, not a fourth format
Choosing on the spectrum in practice
Sign in to unlock the full deep dive.

Situations where this technique stops working.

Sign in to see when this approach fails.

2–4 min · Everything important, quickly.

Sign in to see the quick scan of the deep dive.
MechanismOutput formatWho parsesReliabilityPortability
ReAct free-form textNatural-language action lineYour runtimeLow, brittle string parsingHigh, any model
OpenAI function callingJSON arguments objectProviderHigh, schema validatedLow, OpenAI format
Anthropic tool usetool_use content blockProviderHigh, schema validatedLow, Anthropic format
MCPJSON-RPC over transportMCP client libraryHigh, typed contractHigh, 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.
Sign in to see more production examples.

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?
A

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.

2 more follow-ups an interviewer would ask next. Sign in to reveal them.

Red flags & common mistakes

The phrases that signal junior thinking. Click to expand.

Most common mistake

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.

Sign in to see all red flags and common mistakes.

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.

Sign in to unlock the revision sheet.

Primary sources. Browse if you want the original framing.

Similar questions

Same topic, related formats. Practice these next.

4 curated
Next question
What is the Model Context Protocol (MCP) and what problem does it solve?
MCQ·Easy