MCP resources and prompts: when your server should expose data and templates instead of tools
Most MCP servers ship nothing but tools. The 2026-07-28 spec gives you two other primitives with a different owner, resources for the app and prompts for the user. Here is how each one works on the wire and how to decide which one a feature belongs in.
Some links are affiliate links; we may earn a commission at no extra cost to you. As an Amazon Associate I earn from qualifying purchases. Disclosure
Open almost any MCP server repo and you will find a long list of tools and nothing else. A tool to read a file, a tool to fetch a schema, a tool to load a style guide, a tool that returns a canned "review this pull request" instruction. It works, because every client supports tools and the model will happily call them. But it also means the model has to spend a turn deciding to fetch context that the user or the app already knew it wanted, and every one of those tool descriptions sits in the context window whether it gets used or not.
The protocol has had an answer to this since the start, and the 2026-07-28 revision keeps it: servers can expose three kinds of things, and they differ less in shape than in who decides when they get used. This post walks through resources and prompts as they work in the current spec, and then gives a practical way to sort a feature into the right bucket.
Three primitives, three owners
The spec is unusually direct about control. The tools page says tools are "model-controlled," meaning the model discovers and invokes them on its own based on the conversation. The resources page says resources are "application-driven," with the host app deciding how to pull them into context, whether that is a picker the user browses, a search box, or automatic inclusion based on some heuristic. The prompts page says prompts are "user-controlled," and it clarifies that this is about who decides when a prompt is used, not who wrote it. The server still authors the content.
That framing is the whole decision in miniature. If the model should be the one to decide, it is a tool. If the app or the user should decide before the model ever sees it, it is a resource or a prompt. Neither spec page mandates a particular UI, so clients are free to present these however they like, but the intent behind each primitive is spelled out.
How resources work
A resource is a piece of data with a URI. Your server declares the resources capability, optionally with listChanged and subscribe flags, and then answers resources/list with entries that carry a uri, a name, and optional title, description, mimeType, size and icons. The client reads one with resources/read, passing the URI, and gets back a contents array of text or base64 blob entries. A single read may return several items, and the spec's own example is a directory resource that returns the contents of multiple files.
For anything parameterized, you do not list every possible URI. You publish a resource template through resources/templates/list using an RFC 6570 URI template such as file:///{path}. The client fills in the variables, and the completion utility lets it ask your server for suggestions as the user types, with a ref/resource reference pointing at the template and a cap of 100 values per response. A database server might publish postgres://{schema}/{table} and complete table names, which gives the user an autocomplete box instead of a model guessing at a table name and burning a tool call on a typo.
Two details in the current revision matter for real deployments. First, list and read results carry caching hints. The spec examples show a ttlMs value and a cacheScope of public or private on resources/list and resources/read responses, so a schema that changes once a day can tell the client to hold on to it. Second, the set of resources a server returns must not vary per connection or as a side effect of earlier requests, but it may vary by the authorization on the request. That fits the stateless direction we covered in our post on the 2026-07-28 revision: if a user's token only grants access to two projects, list those two.
Change tracking comes in two forms. With listChanged, the server sends notifications/resources/list_changed when the set of resources changes. With subscribe, a client opens a subscriptions/listen stream naming the URIs it cares about in resourceSubscriptions, and the server pushes notifications/resources/updated whenever one of them changes. The client then re-reads the resource. That is a better fit for a live log or a build status than having the model poll a tool every few turns.
Resources also carry annotations that tools do not have in the same form. audience can be user, assistant or both, priority runs from 0.0 to 1.0, and lastModified is an ISO 8601 timestamp. A client building context under a token budget can use priority to decide what to drop first, which is exactly the kind of decision you want made in code rather than by the model. If you are thinking about context budgets more broadly, Chip Huyen's AI Engineering has a solid chapter on context construction for retrieval-backed apps that applies here too.
The spec's error rules are worth copying exactly. A missing resource must return JSON-RPC error -32602, clients should also accept the older -32002 code, and servers must not return an empty contents array for something that does not exist, because an empty array could also mean the resource exists and is empty. The security section requires servers to validate every URI and to sanitize file paths against directory traversal when serving file:// resources.
How prompts work
A prompt is a server-authored message template the user picks on purpose. The common presentation is a slash command, and the spec page shows one as its example. Your server declares the prompts capability, answers prompts/list with entries that have a name, optional title and description, and an arguments list where each argument can be marked required. The client calls prompts/get with the name and the filled-in arguments and receives a list of messages, each with a role of user or assistant and a content block.
That content block is where prompts get more useful than a pasted instruction. Besides text, a prompt message can carry images, audio, a resource_link pointing at a URI the client can fetch, or an embedded resource with the text or blob inlined. So a code_review prompt does not have to say "please read main.rs first." It can embed the file directly in the first user message, which removes a whole round trip where the model would otherwise have to call a read tool.
Prompt arguments can be autocompleted the same way template variables can, using a ref/prompt reference. The completion spec also lets the client pass previously chosen values in context.arguments, so if the user already picked python for a language argument, your server can suggest flask rather than flutter when they type "fla" into a framework argument. The spec's own example uses exactly that pair.
Both prompts/get and resources/read may also come back with an InputRequiredResult under the multi round-trip requests pattern, so a prompt that needs one more answer from the user, such as which branch to compare against, can ask for it without your server holding a session open.
Deciding where a feature goes
Here is the test we use. Ask who already knows that this thing is needed at the moment it is needed.
If the model is the only party that can know, because it depends on what the conversation has turned up, it is a tool. Searching tickets for a phrase the user just mentioned, creating a branch, sending a message, running a query the model composed: these are actions or lookups the model has to choose, and they belong in tools/list with a good description and schema. Anything with side effects belongs here too, since tools are where clients put approval gates, which we wrote about in human approval gates for agent tool calls.
If the user or the app knows before the model starts, it is a resource. The project README, the database schema, the API reference for the SDK the user is working in, the current contents of an open file, a design system's tokens. Exposing these as tools forces the model to notice it needs them and spend a call fetching them. Exposing them as resources lets the user attach them or the app include them up front, with caching hints and change notifications thrown in.
If the user wants to kick off a known workflow, it is a prompt. "Review this diff against our style guide," "write release notes from these commits," "triage this incident." These are repeatable instructions the user chooses, and making them prompts means the instruction text lives on your server, versioned with the rest of your code, instead of being retyped into chat or hidden inside a tool that returns instructions as its output.
There is a reasonable middle path for data the model might discover mid-run. A tool can return a resource_link in its result, and the tools spec notes that such links are not guaranteed to show up in resources/list. So a search tool can return links to the five matching documents, and the client can read or subscribe to them as resources without your server dumping five full documents into one tool result.
The catch: client support
The honest caveat is that hosts differ in how much of this they surface. Tools are universal; resource pickers, subscriptions and slash-command prompts are less consistently supported across clients. The capability negotiation in the spec is how you find out what a given client accepts, so check the client capabilities on each request's _meta before relying on any of it. A safe pattern for a public server is to expose the important data both ways for now, as a resource for clients that support it and as a narrow read tool as a fallback, and to drop the fallback once your logs show the clients you care about are reading resources directly.
Even with that caveat, moving static context out of your tool list pays off quickly. Fewer tool descriptions means a smaller prompt on every turn, fewer wasted calls where the model fetches something the user already pointed at, and a server whose shape tells clients what you actually meant. If you are still sketching the server itself, our plain-English guide to MCP servers and the post on writing tool descriptions and schemas cover the parts that stay tools.