↑↓ move Enter open ⌘K find from any page 256 of 256 tabs
Loading the recording…

Tools served by a separate program

In the ReAct and Tool calling tabs the tools are functions inside the program that runs the model. The Model Context Protocol (MCP) moves them into a separate program, an MCP server, that any application can start and talk to in the same way. The application that runs the model is the client: it asks the server which tools it has, shows them to the model, and forwards the model's calls. A tool written once as an MCP server then works with every client that speaks the protocol, instead of being rewritten for each application.

This tab records one session between a client and a local server built with the official mcp Python SDK, version 2.3.0. The server offers three tools, search over the 2,067 SQuAD paragraphs the Retrieval tabs index, calculate for arithmetic and day_of_week for a date, and Qwen3-1.7B answers four questions through it, thinking mode off.

JSON-RPC over stdio

The client starts the server as a subprocess and they exchange JSON-RPC 2.0 messages, one JSON object per line, on the server's standard input and output. A request has a method, params and an id; its response carries the same id and either a result or an error; a notification has no id and gets no response. A small relay between the two copied every line that crossed the pipe, and the panel On the wire lists all 11, client to server and back.

The session opens with the handshake the specification's revision 2025-11-25 defines. The client sends initialize with the protocol version it speaks and its capabilities. The server answers with the version it agrees to, its name and version, what it offers (tools, prompts and resources, each with flags saying whether their lists can change) and its instructions, a sentence the client may show the model. The client confirms with the notification notifications/initialized. The SDK's client by default first tries server/discover, a request from a newer, stateless draft of the protocol; this session starts it in its legacy mode so the wire shows the classic handshake.

From tools/list to the prompt

The client then sends tools/list. For each tool the server returns a name, a description and an inputSchema, a JSON Schema of the arguments that the SDK builds from the Python function's signature and its annotated descriptions. The schemas even keep the titles the SDK generates, such as searchArguments.

The model never sees MCP itself. The client turns each tool into the function format chat templates expect, , and Qwen3's chat template writes them into the system turn inside a pair of tools tags, after the server's instructions and before its own rules for calling. The panel tools/list becomes the prompt shows that block: 265 of the 398 tokens of the first prompt, and the model reads them again on every reply.

A call, end to end

When the model wants a tool it writes JSON with the tool's name and arguments inside a pair of tool_call tags, as the template's rules ask. The client parses it and sends tools/call with a fresh id. The server runs the function and answers with a content list, here one text item, and isError. A tool that raises an exception still answers with a result, isError set to true and the error message as its text, so that the model can read what went wrong; a JSON-RPC error is reserved for protocol failures such as an unknown method. The client pastes the text back as a tool message, which the template wraps in tool_response tags, and asks the model again. A reply without a call is the answer.

Clicking a tools/call in On the wire selects the question and the reply that made it, the selected question's requests and responses are marked, and a reply that made a call opens its request. The page checks that every call re-parses from the model's tokens to exactly the arguments the client sent.

What the model did with it

The protocol worked: three tools/call requests, three results, no errors, and a replay against a fresh server returned every response unchanged. The model answered none of the four questions right, and the reasons are all on the model's side of the wire:

  • On the Tesla and Luther question it wrote that it would look up both birth years, and ended its reply without a call, so that sentence became its answer.
  • Asked on which weekday Super Bowl 50 was played, it called day_of_week straight away with 2015-12-31, a date it guessed instead of searching for, and the server correctly answered Thursday; the game was on 7 February 2016, a Sunday.
  • On Harvard and the University of Chicago it searched once, got two University of Chicago paragraphs that say 1890, then wrote that Harvard was founded in 1869 and was 11 years older, without calling calculate.
  • On Kenya's independence it called day_of_week with 1963-06-12, again without searching; independence came on 12 December 1963, a Thursday.

MCP standardises how a model finds and calls tools, not whether it calls the right ones with the right arguments; that is the model's skill, which the ReAct and CodeAct tabs measure with the same model.

Where it came from

Anthropic released MCP as an open standard in November 2024, borrowing the shape of the Language Server Protocol, which lets one language server serve every editor. Before it, each framework described tools in its own format, as Gorilla did for machine-learning model APIs and ToolLLM for 16,000 web APIs. Hou et al. (2025) survey the servers and clients that followed and the security risks of running tools other people wrote, at each stage of a server's life.

Papers

  1. Model Context Protocol Specification, revision 2025-11-25 Model Context Protocol contributors · 2025 The protocol: JSON-RPC messages, the initialize handshake, tools/list and tools/call, and the stdio transport this page records.
  2. Model Context Protocol (MCP): Landscape, Security Threats, and Future Research Directions Xinyi Hou, Yanjie Zhao, Shenao Wang, Haoyu Wang · arXiv 2025 How MCP's hosts, clients and servers fit together, the servers built so far, and the security risks of each stage of a server's life.
  3. Qwen3 Technical Report An Yang et al. · arXiv 2025 The model recorded here, whose chat template writes the tool schemas into the prompt and reads its tool_call blocks.
  4. ReAct: Synergizing Reasoning and Acting in Language Models Shunyu Yao et al. · ICLR 2023 The loop the client runs: the model acts, the tool's result comes back, and the model continues.
  5. Gorilla: Large Language Model Connected with Massive APIs Shishir G. Patil, Tianjun Zhang, Xin Wang, Joseph E. Gonzalez · arXiv 2023 A model trained to write calls to the model APIs of Hugging Face, TorchHub and TensorFlow Hub, reading their documentation from a retriever.
  6. ToolLLM: Facilitating Large Language Models to Master 16000+ Real-world APIs Yujia Qin et al. · ICLR 2024 Tool use across 16,000 real REST APIs, each described in its own format, the fragmentation a shared protocol removes.

See also