Why it matters
The three are often compared as alternatives, which leads to arguments about which one to adopt. They answer different questions. Function calling decides how the model expresses an intent to call something. MCP decides how the application finds that something and talks to it. REST decides how a service exposes its data and operations. Confusing the layers produces either a bespoke integration per model or a protocol adopted for a problem it does not solve.
Mental model
Function calling is a spoken request, MCP is the phone network, and REST is the office's filing system. The metaphor breaks because the request, the network and the filing system can all be replaced independently, and each has failure modes that look like the others.
How it works
Three protocol layers, four hops. The provider tool schema is not an MCP schema and not a REST schema; the host translates between them, and each layer reports its own failure.
Model
provider
Host
routes
Server
MCP
API
REST
{ "choices": [{ "message": {
"role": "assistant",
"tool_calls": [{
"id": "call_1",
"type": "function",
"function": {
"name": "issues_search",
"arguments":
"{\"query\":\"refund window\"}" } }] },
"finish_reason": "tool_calls" }] }
The arguments are a JSON string here. The host
parses them before the next layer.Step 1: model turn. Hover, tap or tab to any message to inspect its payload.
Figure. The same request changes shape at every boundary: a provider tool call with string arguments, an MCP tools/call with an object, and an HTTP GET to the system of record. The 403 is produced by the REST layer, not by MCP or the model, and the app returns it as a tool result the model can read.
What to notice. The failure is authorisation assumed by the protocol: the MCP server used its own service identity, and the REST API requires a token delegated by the user. MCP carries the result, so the model sees permission_denied and does not retry. Schema duplication and layer-confusion selection errors are omitted. The provider payload is simplified, and ids, scopes and issue text are illustrative.
Text version
Sequence across Model (the provider API), Host (application plus MCP client), Server (MCP server) and API (system of record). Step 1, model turn: Host to Model a chat request with a user message and one function tool, issues_search, whose parameters require query; Model to Host a tool_calls array with call_1, function issues_search and arguments as the JSON string '{"query":"refund window"}'. Step 2, MCP call: the Host parses the string and sends tools/call with name issues_search, arguments query refund window and _meta naming protocolVersion 2026-07-28. Step 3, REST call: Server to API GET /v1/issues?q=refund%20window with Authorization Bearer for the host service identity. Step 4, denied: API to Server HTTP 403 with error user_scope_required, explaining that a service token cannot read customer issues. Step 5, tool result: Server to Host resultType complete, content text permission_denied and structuredContent code permission_denied, upstream_status 403, isError true; the MCP call succeeded, the tool failed. Step 6, result turn: Host to Model the assistant tool_calls message plus a role tool message with tool_call_id call_1 carrying the error; Model to Host a final answer saying the issues connection is authorised as the host service, not the user. The three protocol layers have different schemas, owners and fixes.
- Start from the model API: define tools in the format the provider expects, with a name, description and JSON schema.
- Decide whether the tool implementation is in-process, an MCP client call or an HTTP request to an existing API.
- If the capability should be reusable across hosts, put it behind an MCP server and let the host discover it.
- If the capability is an existing service, keep the REST contract and adapt it at the tool boundary rather than reshaping the API.
- Validate arguments and authorise the call in the application, regardless of which layer produced the request.
- Keep the model-facing description separate from the service's internal documentation, because the audiences differ.
Trade-offs
| Choice | Good for | Cost | Fails when |
|---|---|---|---|
| In-process function calling | Simplest, lowest latency | Tied to one host and one codebase | Several applications need the same tool |
| MCP server | Reuse across hosts | Another process or service and a trust boundary | The capability is used by one application |
| Direct REST call from the model layer | No new abstraction | No discovery, bespoke schema per integration | The API surface is large or changes |
| Generated tools from OpenAPI | Coverage of an existing API | Noisy tool lists and poor descriptions | The spec is huge or undocumented |
Good for
Simplest, lowest latency
Cost
Tied to one host and one codebase
Fails when
Several applications need the same tool
- Several applications need the same tool
- The capability is used by one application
- The API surface is large or changes
- The spec is huge or undocumented
Figure. Each choice with what it buys, what it costs, and the case where it loses.
What to notice. The fourth column is the decision: if the losing case describes your situation, the choice is wrong.
Text version
Four trade-offs: In-process function calling is good for Simplest, lowest latency, costs Tied to one host and one codebase, and fails when Several applications need the same tool. MCP server is good for Reuse across hosts, costs Another process or service and a trust boundary, and fails when The capability is used by one application. Direct REST call from the model layer is good for No new abstraction, costs No discovery, bespoke schema per integration, and fails when The API surface is large or changes. Generated tools from OpenAPI is good for Coverage of an existing API, costs Noisy tool lists and poor descriptions, and fails when The spec is huge or undocumented
Failure modes
- Layer confusion. A team adopts MCP expecting better tool selection, and selection gets worse because the catalogue grew. Debug: measure selection accuracy before and after the change on a labelled query set.
- Schema duplication. The function schema and the REST schema drift and the model sends fields the service rejects. Debug: generate both from one source and diff them in CI.
- Auth assumed by the protocol. The team expects MCP or the model API to authorise the action. Debug: call the tool with a low-privilege token and confirm the service rejects it.
In production
Monitor per-layer error rates separately: model-produced invalid arguments, MCP transport failures and upstream HTTP errors. They have different fixes and different owners.
Common misconceptions
People think: MCP replaces function calling.
Actually: It sits below it: the model still emits a structured call, and the host routes it to an MCP server.
People think: REST is obsolete once you have tools.
Actually: Most tools are wrappers over HTTP APIs; the API remains the system of record.
Interview angle
A strong answer draws the three layers and places a concrete request through them. It also says where authorisation happens. Weak answers compare them as competing standards and pick one.
Sources
- OpenAI, Function calling guide — the model-side tool call mechanism.
- MCP specification — discovery and invocation between host and server.
- OpenAPI Specification 3.1 — how an HTTP service describes its operations.