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

How do resources differ from tools in MCP, and when would you expose data as a resource?

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

A tool is an action the model calls, while a resource is read-only data the host reads and puts into context.

Tools Resources
Who invokes it the model the host or user
Purpose perform work supply context
Addressed by name plus arguments a URI
Side effects allowed none expected
Method tools/call resources/read

Roughly, resources are GET and tools are POST.

{
  "uri": "file:///project/schema.sql",
  "name": "Database schema",
  "mimeType": "text/plain"
}

Expose data as a resource when it is stable, addressable content a user may want to attach: a file, a schema, a log. Host support varies, though, and some clients ignore resources. If the model itself must fetch the data, also ship a tool.

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.
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. A tool is an action the model decides to call, and a resource is read-only data that the host or user pulls into context.
  2. Tools are addressed by name plus arguments and go through tools/call, while a resource has a URI and is read with resources/read.
  3. Tools can have side effects and resources shouldn't have any, so I think of resources as GET and tools as POST.
  4. I'd expose something as a resource when it's stable, addressable content a user might want to attach, like a file, a database schema or a log.
  5. The catch is that host support varies and some clients ignore resources, so if the model itself needs to fetch that data, I also ship a tool.

Weak answers to avoid

  • Says a resource is just a tool that returns data It misses who invokes each one. The model calls tools, while the host or user attaches resources. Lead with who is in control, then the method and addressing.
  • Puts writes or side effects behind a resource Resources should be read-only, like GET. Anything that changes state belongs in a tool, where the host can ask the user before it runs.
  • Assumes every host shows resources Client support varies and some ignore resources entirely. Say you'd also ship a tool when the model has to fetch the data itself.
  • Defines both but never says when to use a resource The second half of the question asks when. Name stable, addressable content a user may attach, like a schema or a log, plus the fallback tool.
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