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

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

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

A tool is a callable function a server exposes to the model. Each tool definition has a name, a human-and-model-readable description, an inputSchema (JSON Schema describing the arguments), and optionally an outputSchema, a title, and behavioral annotations.

Discovery and execution use two protocol methods. The client calls tools/list to get definitions and tools/call to execute one:

{
  "jsonrpc": "2.0",
  "id": 7,
  "method": "tools/call",
  "params": {
    "name": "get_weather",
    "arguments": { "city": "Berlin" }
  }
}

The result contains a content array with text, image, audio, or resource blocks. It may also include structuredContent when the tool declares an output schema, plus an isError flag for failures. The host displays the result or returns it to the model.

Two details matter in practice. First, the model chooses tools based almost entirely on names and descriptions, so those are effectively prompt engineering. Second, if the server declares the listChanged capability it can push a notifications/tools/list_changed notification, after which the client re-fetches the list. Tool sets are dynamic, not fixed at startup.

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?
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

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

48 of 55 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