LearnThatStack Ace your next interview
Model Context Protocol (MCP) · question
Question 4 of 56

What exactly is an MCP tool, and how does a client discover and call one?

beginner
← All Model Context Protocol (MCP) questions
Re-explain
Visual ↓

A tool is a function a server exposes that the model can choose to call. Each tool has a unique name, a description, and an inputSchema, the JSON Schema that describes its arguments.

Discovery and calling are two JSON-RPC methods. The client sends tools/list and hands the returned definitions to the model. When the model picks one, the client sends tools/call with the name and arguments. The server returns content blocks such as text, images, or embedded resources.

// client -> server
{"jsonrpc": "2.0", "id": 2, "method": "tools/call",
 "params": {"name": "get_weather", "arguments": {"city": "Berlin"}}}

// server -> client
{"jsonrpc": "2.0", "id": 2,
 "result": {"content": [{"type": "text", "text": "18C, cloudy"}], "isError": false}}

Two details matter. Tools are model-controlled, so hosts should ask the user before running one. And if the server declares the listChanged capability, it can send notifications/tools/list_changed, and the client must re-list to stay current.

Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

Why there's no diagram: “”

The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓

The diagram below the answer is the concept . Jump to it ↓

Tailored explanation · switch back to · ·
What should the new diagram focus on?
Guided practice for Model Context Protocol (MCP) One question at a time. Answer out loud, get graded, see what you missed.
See it - interactive diagram
How a client discovers and calls an MCP tool
User
Model
Host + client
MCP server
tools/list
name, description, inputSchema
tool definitions
get_weather, city: Berlin
Run get_weather?
approve
tools/call get_weather
content: "18C, cloudy"
tool result
list_changed notification
1step

The client asks the server what tools it has. This is a JSON-RPC request, a JSON message that names a method and expects a reply.

1 / 10

The model never talks to the server. The client lists tools, asks the user, sends tools/call, and carries the result back to the model.

© LearnThatStack - diagrams may not be republished without permission.

Other questions have diagrams like this too. Sign in to ask for one where it's missing - it's free.

Create a free account
How well did you know this?
AI:

Saved in this browser - sign in to keep your review list.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Interview lens How interviewers actually use this question

Likely follow-ups

What you can say

  1. An MCP tool is a function a server exposes that the model can choose to call, and each one has a unique name, a description, and an inputSchema written in JSON Schema.
  2. Discovery is a single JSON-RPC request. The client sends tools/list and hands the returned definitions to the model.
  3. When the model picks a tool, the client sends tools/call with the name and the arguments, say get_weather with the city Berlin.
  4. The server replies with content blocks, which can be text, images or embedded resources, along with an isError flag.
  5. If the server declared the listChanged capability, it can send notifications/tools/list_changed, and the client has to call tools/list again to stay current.
  6. The part I'd stress is that tools are model-controlled, so the host should ask the user before running one, because the model made that choice, not the user.

Weak answers to avoid

  • Confuses tools with resources Resources are data the application decides to read. Tools are actions the model decides to call. Say who controls the call, since that drives the consent rules.
  • Jumps straight to the call, skips discovery The model can only pick a tool it has seen. Explain that tools/list comes first and that its definitions are what the model reasons over.
  • Says the model calls the server directly The model only outputs a choice. The client sends tools/call and returns the result, and that step is where the host can ask the user first.
  • Treats the tool list as fixed after startup A server with listChanged can add or drop tools at runtime. Mention notifications/tools/list_changed and that the client must re-list.
Interview lens

Likely follow-ups, what you can say, and the weak answers to avoid.

Sign in free to open it Free account - the lens opens as soon as you're back.

Want a quick review of the fundamentals? See the Model Context Protocol (MCP) cheatsheet.

← Back to all Model Context Protocol (MCP) questions
Pro · $10/mo

49 of 56 Model Context Protocol (MCP) answers are in Pro.

Full answers, code samples, and AI explanations that go simpler or deeper. Cancel anytime.

  • Full answers + code
  • AI explanations, simpler or deeper
  • 1,000 AI credits / month
  • Cancel anytime