Function Calling and MCP First Principles

Download printable cheat-sheet (CC-BY 4.0)

11 May 2026, 00:00 Z

Function calling and Model Context Protocol (MCP) are not competing ideas.

They handle different parts of the same loop.

Function calling is how the model asks for a tool. MCP is one way your app finds tools, documents, and reusable prompts from servers.

If you read for 1 second:

The model picks a tool from a menu. Your app decides whether to run it. MCP can help fill that menu.

If you read for 10 seconds:

  • the model cannot reach into your systems by itself
  • function calling lets it request a named tool with structured arguments
  • your app validates that request and runs the real code
  • MCP lets your app discover tools from reusable servers instead of wiring every tool by hand

For example, if a user asks, "Where is order A100?", function calling lets the model request get_order_status with order_id: "A100". MCP is one way your app can make get_order_status available from an orders server.

The model picks a tool from a menu. Your app does the work.

It cannot reach into your systems by itself. Function calling is how it asks for one tool from a menu. MCP is one way your app fills that menu from servers.

1User

What is the status of order A100?

2App

Here is the menu: get_order_status needs an order_id.

3Model

Please call get_order_status with order_id A100.

4App

Check the request, run the lookup, and return the result.

5MCP

If that tool came from an MCP server, route the call back to that server.

The menu the model sees

The model sees names, descriptions, and inputs. It does not receive your database password, API client, or executor code.

{
  "name": "get_order_status",
  "description": "Look up one order.",
  "parameters": {
    "order_id": "string"
  }
}

What happens where?

Does the model see your real systems?

No. It sees a small menu: tool names, descriptions, and the input each tool needs.

get_order_status needs { "order_id": "string" }

Useful shortcut: function calling is the model asking for work. MCP is a standard way for your app to find tools and context on servers.

This walkthrough was prompted by a useful public ChatGPT discussion about function calling and MCP. The explanations below are grounded in the official OpenAI function calling guide, the OpenAI MCP and connectors guide, the MCP architecture specification, and the MCP tools specification.

If you read for 100 seconds

If you have about a minute, remember the five-part flow:

  1. Your app gives the model a small tool menu.
  2. The user asks a question.
  3. The model requests one tool from that menu.
  4. Your app checks the request and runs the real code.
  5. Your app sends the result back to the model.

MCP fits before and during that flow. Before the model sees the menu, an MCP client can ask an MCP server what tools it offers. During execution, the host can route the chosen call back to that server.

MCP server lists tools
Host shows selected tools to the model
Model asks for one tool
Host checks and routes the request
Tool result goes back into model context

That is the core idea. The rest of the article explains why those boundaries matter in production.

Start with what the model can see

A language model is not your database, browser, payment processor, filesystem, or warehouse system. It can reason over the context you send it, but it cannot inspect your production systems on its own.

AI video production

Turn AI video into a repeatable engine

Build an AI-assisted video pipeline with hook-first scripts, brand-safe edits, and multi-platform delivery.