MCP has tools, resources, and prompts. What makes a resource different from a tool?
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
A resource is read only, URI identified data that the host (not the model) pulls and injects into context. Tools are model invoked and may have side effects; resources inform without acting.
Think of the AI app as someone with a library card. The librarian (the MCP server) keeps a catalog of documents, each with a unique address like a call number. When the app decides the model needs to see a document, the app goes to the librarian and asks for it. The model never walks to the shelves itself; only the app does. And nothing the app does to a document changes it: there is no write back, no edit, no delete. Resources are how MCP lets a server share read only context with the model without giving the model the keys to modify anything. Files, database rows, web pages, log snippets: any blob of data that should be read but never changed through this channel can be a resource.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
5 min: define resources as read only and host pulled, describe URI identification and templates, name the three JSON-RPC methods (list, read, subscribe), distinguish resources from tools and prompts on invocation and side effect axes, and name three concrete examples from real servers.
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Believing the model invokes resources directly. The host pulls resources and decides when to inject the content; the model only sees what the host chose to include.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.