Tool calls and the Model Context Protocol (MCP)

A language model cannot run anything. It writes a request in text, and a separate program decides whether to carry it out.

You ask an AI assistant what is on your calendar tomorrow. A box appears asking to let the assistant read your calendar, with Allow and Deny buttons. You press Allow and the answer appears. A language model produces only text, so a separate program must have asked for that lookup and run it.

The model's requestTool call
The assistant appClient
Your calendar or databaseData
Think first. A model produces only text. Between your question and your data, where could a person or a program stop a harmful request?
Collect answers before anyone opens the next step. The point to reach is that the request exists as text before anything runs, and the client sits between the model and the data.

Choose a tool, then press Step to follow one request from your question to the answer. The model only writes text, and the client carries out each request. On the risky tool, press Step until the Refuse it button appears.

More detail

What the model was given

This box is a tool description written in JSON, a plain-text format for structured data. It has a name, a one-sentence description and the shape of the input the tool accepts, called its schema. SQL is the language used to read and change database tables.

This is everything the model knows about the tool. It has never seen your tables, your rows or your server. It chooses a tool by reading the description, so a vague description leads to the wrong tool being called. That is a bug in the description, and the model is working as designed.

The risky statement

The delete statement has no WHERE clause, which limits a statement to certain rows, so it applies to every row. This is the missing WHERE clause from SQL basics, this time sent by an agent and carried out in a moment.

Standing rules

In a loop of twenty steps, requests can go past faster than you can read them. So people set standing rules and stop reading every call. Typical rules are read-only tools by default, approval required for writes, and destructive statements refused.

Without a standard, each AI application needs its own adapter for every system it reaches. The Model Context Protocol (MCP) is a shared standard, so each side is built once. MCP delivers requests. It does not decide whether to make one. Compare the counts.

One adapter per pairing
One shared standard

You can now say what MCP standardizes and what it leaves to a person.

More detail

Server and client in MCP

An MCP server is a small program that wraps one system and lists what it offers. An MCP client sits inside the application you are using. It asks the server for that list and passes the model's calls on. Write the server once and any client that follows the protocol can use it. The lesson What a server is uses the word "server" for a different thing.

Where MCP came from

MCP is a published standard that anyone can implement. Anthropic released it in November 2024 and other vendors adopted it.

What MCP gives you

Every call passes through the client before it reaches anything real, so approval, logging and refusal each have a place to happen. The model can only ask for tools it was offered, so if it says it cannot read your file, the usual reason is that nobody gave it a tool that reads files. The same server works in whichever editor or agent you move to next.

What it does not give you

A tool that deletes rows will delete rows whenever it is called correctly. Deciding whether the request should have been made stays with you, and in an agent loop requests can arrive faster than you can read them.