Frontier Foundry

MCP vs Function calling

41 sourced facts · updated

MCP vs function calling (tool use): what is the difference?

They sit at different levels, so they are not rivals. Function calling (tool use) is how a model asks for work: it reads the tool definitions and writes a function name and arguments, and the developer's code runs the call. MCP is a protocol for where tools come from: an MCP server exposes tools to an agent app, and sign-in can sit outside the agent. In the sources MCP servers sit in the same tool catalog as other tools, and both share one cost: every tool definition competes for the context window. [1][2][3][4][5][6]

In the knowledge graph: A tool call is what the model asks for; this district is what happens to it on the way.

The difference between MCP and Function calling

MCPFunction calling
What it isA protocol with more than tools in it: server instructions, resources, elicitation and long-running tasks. Clients support these unevenly: Figma found that in many clients only tools worked. [7][8][9][10][11]The model reads one or more function definitions and the user input, then returns which function to call and with which arguments. It does not run anything itself. [1][2]
Who runs the toolThe tool lives on a server. Curn's mcpc connects to local stdio servers directly and to remote servers after a browser login. Lopez says a hosted server is always current, while a CLI needs versioning and package updates. [12][13]The developer's code: in the AI SDK a tool has a description, an input schema and an execute function that runs each time the agent uses it. Provider-executed tools such as web search run on the provider's servers, at the cost of being tied to one provider. [14][15]
What it costs in contextCurn says ten MCP servers can mean about a hundred tools, with maybe a third of the context gone before any work, because naive clients register all of them. Anthropic's Soria Parra calls this a fair criticism of how clients are built, not of the protocol. [4][16]In one talk's benchmark, 741 tool definitions took 127,000 tokens in every request. Tool-selection accuracy was 13.6% with all of them in the prompt, about 40% near 100 tools and 78% at 10. [17][18]
How a big catalog is tamedHide tools behind a few meta tools. LinkedIn says MCP cannot scale beyond about 30-40 tools without degrading, so three meta tools front 600+ playbooks. Cloudflare's server exposes two tools, search and execute, cutting about 1.2 million tokens to about 1,000 (the speaker's figure). [19][5]Route before the call. A router that embeds each tool's description and injects only the 3 to 5 closest schemas cut tool context to about 1,000 tokens, as the talk reports. It can miss the tool the model needs, and with fewer than 20 tools it may be unnecessary. [20][21][22]
Sign-in and checks on a callAn MCP client can run per-user OAuth and scoped tool permissions outside the sandbox, so the agent never holds the raw credential (Schmid's case). One limit: the server usually sees only the user's token, so it cannot tell whether a user or an agent made the request. [3][23]Checks sit in the harness around the call: Claude Code fires a pre-tool event before every call and a post-tool event after it, so a hook can check or block a call without changing the agent's code. [24]
How it goes wrongMirroring an API: Reducto gave its first server one tool per endpoint. It demoed well, but the agent confidently built whole document workflows that neither users nor the agent could explain. [25]Bad arguments: one open model sent an empty object or null where an optional argument should be left out. The strict validator returned its error and the model sent the same call again, on average 56 repeats in a billion tokens. [26]
Where big results goA normal MCP tool result goes through the agent's context window. Claude Managed Agents spill any MCP tool output over 100k characters to a file in the sandbox and give the model a truncated preview and the path. [27][28]Large results are treated as files: the harness truncates inside the JSON, keeps a pointer, and lets the agent find the rest by writing code, for example with jq. [29][30]

When to use MCP

  • The agent has to reach a remote service on a user's behalf. Schmid says CLIs and raw curl put API keys on disk or in environment variables, while an MCP client runs per-user OAuth and scoped permissions outside the sandbox. [3]
  • You want a server that stays current without package updates: Lopez says a hosted MCP server is always current while a CLI needs versioning and package updates, though Claude imposes limits such as tool-run duration. [13]
  • A result should go to the user and not through the model: an MCP App sends HTML, CSS and JavaScript to the user and bypasses the context window. Lowin says uploading a megabyte through a normal tool makes the agent retype it character by character. [27][31]

When to use Function calling

  • The function lives in your own code and you want the plain loop: define a description, an input schema and an execute function. The model returns the function name and arguments, and your code runs the call. [14][2]
  • You want the tools a model provider trained its models on: providers post-train models on their own tools, OpenAI has said its models are trained on apply_patch, and LangChain swapped in that tool for Codex. [32][33][34]
  • The catalog is small: in one benchmark, selection accuracy was 78% at 10 definitions, and one talk says a router may be unnecessary under 20 tools. [18][20]

Using MCP and Function calling together

In the sources, MCP servers feed the same tool catalog as other tools. Schmid's account of tool catalogs runs from a handful of tools, to dozens of tools or MCP servers that hit context limits, to tool search and loading on demand. In NVIDIA's case an enterprise assistant connected over MCP drafted a message and also called send_message without asking. The fix was to the harness instructions and how the tool was executed, and the same tasks then passed 6 of 6 runs instead of 3 of 6. Anthropic's Soria Parra says tool search loads the five tools needed, and programmatic tool calling lets the model compose calls in a code block so intermediate values never enter context. [6][35][16]

Can a model call tools without MCP?

Yes. In the AI SDK a tool is a description, an input schema and an execute function. In Qwen3 a tool call is plain text in the token stream: the definitions sit between tool tags in the prompt, the model writes the call between tool_call tags, and the harness parses and runs it. [14][36]

Why do MCP servers use so much context?

Curn and Anthropic's Soria Parra both put it on the client: the spec says nothing about how clients present tools, and most clients dump every tool into context, giving 50-plus tools. Tool search, which loads only the tools needed, is one fix. [37][16]

Should an MCP server have one tool per API endpoint?

Reducto and Schmid both moved away from one tool per endpoint, and speakers disagree on how few tools to ship. Reducto deleted its endpoint-per-tool server and shipped fewer tools. Schmid's example replaces get_user_by_email, list_orders and get_order_status with one track_order(email) tool. Lopez argues for two tools (describe and execute), while Mihalik prefers several small composable tools with simple descriptions. [38][39][40][41]

Each one on its own

from their concept pages

What is MCP?

The Model Context Protocol is a shared standard for connecting agents to tools and data. A server lists its tools with descriptions, and any agent that speaks the protocol can read the list and call them. A tool built once then works in every agent, instead of once per product.

In these talks MCP is the open protocol that lets any agent app list and call tools on a server, and the work has moved from 'how do I build a server' to 'how do I keep it from eating context and leaking access'. Speakers converge on fewer, workflow-shaped tools, progressive discovery or code mode instead of preloading every schema, OAuth plus task-scoped credentials, and a gateway as the control point, while arguing about how MCP relates to CLIs and skills. Client support for spec features is uneven, so builders design for the lowest common client.

10,000-15,000
MCP servers that exist, Jan Curn's rough estimate ('I think') Jan Curn
< 0.5 ms
Average per-request cold start Akamai claims for WebAssembly workloads on Akamai Functions (vendor claim) Thorsten Hans
$420 per hour
Cost of an on-call agent scaling a service from 4 to 40 pods using a static key in Keycard's demo (illustrative, not a real incident) Kim Maida

MCP, explained in full: how it works as a machine, every part and its sources.

What is Function calling?

Tool use lets a model call functions, programs and services instead of only writing text. The model writes a request in a fixed format, the software around it runs the tool and hands back the result, and the model continues. It is how a model gets fresh facts and changes things outside itself.

Tool use is a model asking for a function by name instead of only writing text. The developer defines each tool with a description, an input schema and code to run; the model reads the definitions and writes a call (a name and arguments); the harness checks the arguments, runs the tool and puts the result back in the model's turn, and the loop goes on until the goal is met. The sources show where it goes wrong: arguments that do not fit the schema, calls that come back unchanged, huge results, and results that never arrive.

127,000 tokens
Tokens that 741 tool definitions (names, descriptions, JSON schemas) take in every request, before the user question; a talk about a large catalog Sohail Shaikh
56 repeats
Times a model repeated the same schema-failing tool call after the validation error came back, on average, in a billion tokens (a coding-agent team, one open model) Latent Space
98.7% fewer tokens
Cut in tool-definition tokens, from about 150,000 to about 2,000, that a talk attributes to loading tools on demand over a tool protocol Ankush Rastogi

Function calling, explained in full: how it works as a machine, every part and its sources.

In AI coverage over the last four weeks, MCP took 3.8% and Function calling 2.6%. MCP, week by week

The facts behind this page

41 facts from the two knowledge packs
  1. Models are trained to read one or more function definitions and the user input and return which function to call with which arguments. Pamela Fox, AI Engineer · 2026-06-29 · Function calling
  2. The model answers with the function name and the arguments it wants; it does not call the function itself, which is up to the developer's code. Pamela Fox, AI Engineer · 2026-06-29 · Function calling
  3. Schmid's case against CLIs for remote SaaS: CLIs and raw curl put API keys on disk or in environment variables with broad permissions, while an MCP client runs per-user OAuth and scoped tool permissions outside the sandbox, so the agent never holds the raw credential. Philipp Schmid · 2026-11-26 · MCP
  4. Curn says ten MCP servers can mean about a hundred tools, with maybe a third of the context gone before any work, because naive clients register all of them. Jan Curn, AI Engineer · 2026-10-02 · MCP
  5. Cloudflare's API has about 2,600 endpoints; one tool per endpoint would cost about 1.2 million tokens in the first call. Its MCP server instead exposes two tools, search (code over the OpenAPI spec) and execute (code against the API), cutting that to about 1,000 tokens, a 99.9% reduction (the speaker's figure). AI Engineer · 2026-04-19 · MCP
  6. Philipp Schmid's account of how tool catalogs grew: a handful of tools at first because models could not reliably choose across a large catalog, then dozens of tools or MCP servers that hit context limits, then tool search and loading on demand. Philipp Schmid · 2026-11-01 · Function calling
  7. Figma found client support for the spec uneven: in many clients only tools worked, and VS Code was the one client that eventually supported nearly every piece. Jesse Lumarie, AI Engineer · 2026-06-30 · MCP
  8. Server instructions were in the spec but no clients implemented them at first, so Figma repeated usage instructions inside each tool call. Jesse Lumarie, AI Engineer · 2026-06-30 · MCP
  9. Figma exposes resources such as help articles so the agent can learn the server, instead of sending that guidance inside errors and wasting inference. Jesse Lumarie, AI Engineer · 2026-06-30 · MCP
  10. Figma mimicked elicitation plus sampling with plain tool prompts: ask the user to map unlinked components, then have the agent scan code for matches and send them back in bulk. Jesse Lumarie, AI Engineer · 2026-06-30 · MCP
  11. Asynchronous MCP tasks let a call run on the server while you do other work, but Curn says most clients do not support them; mcpc adds a --task flag. Jan Curn, AI Engineer · 2026-10-02 · MCP
  12. Curn's mcpc connects to local stdio servers directly and to remote servers after a browser login, saving credentials in the OS keychain. Jan Curn, AI Engineer · 2026-10-02 · MCP
  13. A hosted MCP server is always current, while a CLI needs versioning and package updates; but Claude imposes limits such as tool-run duration, says Lopez. Pedro Lopez, AI Engineer · 2026-06-29 · MCP
  14. A tool has three parts in the AI SDK: a description the model uses to decide whether and how to use it, an input schema, and an execute function that runs each time the agent uses it. Nico Albanese, AI Engineer · 2026-04-08 · Function calling
  15. Provider-executed tools such as web search run on the provider's servers, which add the tool result to the message state; the cost is being tied to one provider. Nico Albanese, AI Engineer · 2026-04-08 · Function calling
  16. Anthropic's David Soria Parra says context bloat is a fair criticism of how MCP clients are built, not of the protocol: most clients dump every tool into context, giving 50-plus tools. Tool search loads the five needed, and programmatic tool calling lets the model compose calls in a code block so intermediate values never enter context. Anthropic · 2025-12-11 · MCP
  17. 127,000 tokens: Tokens that 741 tool definitions (names, descriptions, JSON schemas) take in every request, before the user question; a talk about a large catalog Sohail Shaikh, AI Engineer · 2026-06-29 · Function calling
  18. 13.6%: Tool-selection accuracy when all 741 definitions are in the prompt (about 40% near 100 tools, 78% at 10); a router stays above 83%; benchmark reported by the talk Sohail Shaikh, AI Engineer · 2026-06-29 · Function calling
  19. LinkedIn says MCP cannot scale beyond about 30-40 tools without degrading, so three meta tools front 600+ playbooks used by over 8,000 people daily. Ajay Prakash, AI Engineer · 2026-09-09 · MCP
  20. A router that embeds each tool's description and injects only the 3 to 5 closest schemas per request works like retrieval for tools; with fewer than 20 tools it may be unnecessary and past 50 it makes more sense. Ankush Rastogi, AI Engineer · 2026-06-29 · Function calling
  21. A router can miss the tool the model needs, vague descriptions make weak embeddings, and rare tools may never score high; the talk's answers are a fallback that widens K, better descriptions and logging. Ankush Rastogi, AI Engineer · 2026-06-29 · Function calling
  22. about 1,000 tokens: Tokens when a router injects only the 3 to 5 relevant schemas: about a 99% cut in tool context tokens, as the talk reports Ankush Rastogi, AI Engineer · 2026-06-29 · Function calling
  23. An MCP server usually sees only the user's token, so it cannot tell whether the user or an agent made the request, and shared service accounts become over-privileged. Kamil Potrec, AI Engineer · 2026-10-28 · MCP
  24. Claude Code fires a pre-tool event before every tool call and a post-tool event after it, so a hook can check or block a call without changing the agent's code. AI Engineer · 2026-11-29 · Function calling
  25. Every endpoint a tool. Reducto gave its MVP server one tool per API endpoint in one big file. It demoed well, but when the team used it the agent confidently built whole document workflows that neither users nor the agent could explain. Abhi Arya, AI Engineer · 2026-10-08 · MCP
  26. The same bad call, again and again. A tool had optional arguments; one open model sent an empty object or null where none belongs. The strict validator sent back its error, and the model got back the same result and sent the same call again; on average 56 repeats in a billion tokens. Latent Space · 2026-06-06 · Function calling
  27. A normal MCP tool result always goes through the agent's context window; an MCP App sends HTML, CSS and JavaScript to the user and bypasses it. Jeremiah Lowin, AI Engineer · 2026-09-10 · MCP
  28. Claude Managed Agents spill any agent_toolset or MCP tool output over 100k characters (about 25k tokens) to a file in the sandbox. The model gets a truncated preview plus the file path and can read the rest on demand instead of receiving it in context. Anthropic · 2026-05-19 · MCP
  29. Large tool results are treated as files: the harness truncates inside the JSON and lets the agent find the rest by writing code, for example with jq. Fuad Ali, AI Engineer · 2026-10-27 · Function calling
  30. The team keeps a pointer to a big result, like a sticky note on the desk saying where the book is and roughly what it holds, rather than the whole book. Fuad Ali, AI Engineer · 2026-10-27 · Function calling
  31. Uploading a megabyte through an MCP tool makes the agent retype it character by character, the world's most expensive copy paste; an MCP App upload goes straight to the server. Jeremiah Lowin, AI Engineer · 2026-09-10 · MCP
  32. Provider-defined tools are tools a model provider post-trains its models to use well; the provider works on their description and input schema so the agent calls them effectively. Nico Albanese, AI Engineer · 2026-04-08 · Function calling
  33. Claude's edit tool uses search and replace; Codex uses an apply_patch tool, and OpenAI has said its models are trained to use that tool effectively. Simon Willison, Simon Willison · 2026-07-04 · Function calling
  34. LangChain swaps tools per model: for Codex its harness replaced its own edit_file with the recommended apply_patch tool and renamed the execute tool shell_command, because the model was trained on those. LangChain blog · 2026-04-29 · Function calling
  35. Drafted, and also sent.. An enterprise assistant connected over MCP to chat, email and tickets was asked to draft a message with project updates. It drafted it and also called send_message without asking the user. After the harness instructions and tool execution were changed, the same tasks passed 6 of 6 runs instead of 3 of 6. NVIDIA · 2026-11-04 · Function calling
  36. In Qwen3 a tool call is plain text in the token stream: definitions sit between <tools> tags in the prompt, the model writes the call between <tool_call> tags, and the closing </tool_call> token stops generation so the harness can parse and run it; the result comes back between <tool_response> tags. Cameron R. Wolfe, Ph.D., Deep · 2026-06-22 · Function calling
  37. Curn argues bloat is a harness problem, since the spec says nothing about how clients present tools, and that sub-agents still cost tokens and keep sensitive results in context. Jan Curn, AI Engineer · 2026-10-02 · MCP
  38. Reducto deleted its endpoint-per-tool server in one commit and replaced it with fewer tools such as a single classify-to-extract tool, with contextual guidance after each step. Abhi Arya, AI Engineer · 2026-10-08 · MCP
  39. Schmid's order-tracking example: a REST-shaped server exposes get_user_by_email, list_orders and get_order_status, costing three round trips and intermediate results in history. One track_order(email) tool that calls all three internally returns the finished answer in one call. Philipp Schmid · 2026-01-21 · MCP
  40. How granular should tools be? Very few: two tools (describe and execute) plus progressive discovery, with little text in descriptions Pedro Lopez, AI Engineer · 2026-06-29 · MCP
  41. How granular should tools be? Several small composable tools with simple descriptions, so the model can explore data and then choose how to render Dustin Mihalik, AI Engineer · 2026-09-09 · MCP

Cite this page

the version of 2026-12-02
APA
Han, R. (2026, December 2). MCP vs Function calling: what is the difference?. Frontier Foundry. https://www.ryanhan.ai/compare/mcp-vs-tool-use
BibTeX
@misc{han2026-compare-mcp-vs-tool-use,
  author       = {Han, Ryan},
  title        = {{MCP vs Function calling: what is the difference?}},
  howpublished = {Frontier Foundry},
  year         = {2026},
  month        = dec,
  url          = {https://www.ryanhan.ai/compare/mcp-vs-tool-use}
}

More comparisons

all of them