Beyond Tools: MCP Resources, Prompts, and Sampling Explained Practically
2 October 2026 · Updated 28 November 2026 · 12 min read · by Yang Kai
Tools get the attention, but MCP servers can also offer resources and prompts, and request sampling. What each primitive is for, and when to use which.
Prompts inside: MCP Feature Decision Table: Tools vs Resources vs Prompts vs Sampling
Contents
- Tools: actions with side effects, or answers that need computing
- Resources: data the application can offer, not actions the model takes
- Prompts: the server author's expertise, packaged
- Sampling: the server borrows the client's model — with a 2026 expiry notice
- Three mistakes the decision table prevents
- The feature decision table
- A worked example: one server, three primitives
- How we researched this
- What to do next
Most MCP tutorials stop at tools: functions the model can call. Tools are the workhorse, but they are only one of four primitives in the protocol — and picking the wrong one is a design error you feel for months. Reference data forced into a tool makes the model spend a call on something that should simply be present. A repeatable workflow buried in a tool’s free-text parameter loses the schema that made tools safe in the first place.
This article covers the other three primitives — resources, prompts, and sampling — against the official specification as checked in November 2026: what each one is for, who controls it, how it looks in code, and the one change in the protocol’s 2026 revision that every sampling design now has to reckon with.
If tools are still new to you, start with what MCP does for builders and build one minimal tool-based server first — this piece assumes that base and covers the rest of the picture.
The short version:
| Primitive | Who decides | The job it fits | Biggest caveat |
|---|---|---|---|
| Tool | The model | Actions and on-demand computation | Model-initiated, so it needs the tightest validation |
| Resource | The application / user | Stable reference data read into context | Client support and presentation vary widely |
| Prompt | The user | A repeatable workflow’s wording, invoked deliberately | Useless if the client buries it where nobody finds it |
| Sampling | The server asks, the client approves | A model judgement inside a server’s workflow | Deprecated in the 2026-07-28 revision — never make it load-bearing |
Tools: actions with side effects, or answers that need computing
A tool is a function the model decides to call during a conversation. It fits when something must be done or computed on demand: counting words, querying an API, creating a ticket, converting a file. The model chooses the moment and the arguments, which is both the power and the risk — everything in the server security checklist exists because tool calls are model-initiated actions against real systems.
Design tools narrowly. One clear verb, a typed schema, a short result. If you find yourself writing a tool called do_everything with a free-text instruction parameter, you have rebuilt a prompt inside a tool and lost the schema’s protection. The other three primitives exist largely so you do not have to do that.
Resources: data the application can offer, not actions the model takes
A resource is addressable content a server makes available for the client to read — a file, a database row rendered as text, an API response snapshot, a config document. Each resource has a URI, and the specification describes resources as application-driven: the host application decides how context gets incorporated, whether that is a picker the user selects from, a search-and-filter view, or automatic inclusion by the client’s own rules.
That is the practical difference from a tool. Resources are about context, not action. Reading a project’s style guide into the conversation is a resource-shaped job. Searching forty files for the one paragraph you need is a tool-shaped job, because it needs parameters and computation.
The mechanics, per the specification:
- Clients discover resources with
resources/listand fetch one withresources/read. Contents come back as text, or as base64-encoded binary for non-text data. - Resource templates expose parameterised families under one pattern — a URI template such as
drafts://{name}— so one definition covers every draft instead of one resource per file. - Servers can optionally declare
subscribe(clients get notified when a specific resource changes) andlistChanged(clients get notified when the resource list itself changes). Both are optional capabilities, not defaults. - Resources can carry annotations — an intended
audience(user, assistant, or both), apriorityfrom 0 to 1, and alastModifiedtimestamp — which clients can use to filter, rank, and display them.
In the current Python SDK, both forms are one decorator each:
from mcp.server import MCPServer
mcp = MCPServer("docs-tools")
@mcp.resource("docs://style-guide")
def style_guide() -> str:
"""The current house style guide."""
return Path("style-guide.md").read_text(encoding="utf-8")
@mcp.resource("drafts://{name}")
def draft(name: str) -> str:
"""Read one draft by file name."""
...
Reach for resources when:
- The content is stable enough to be selected deliberately — by the user, or by the client application — rather than discovered mid-task.
- The same content gets reused across conversations, like schemas, brand guidelines, or API references.
- You want the human to see exactly what enters the context. That visibility is a budgeting advantage too: resources you choose deliberately are easier to reason about than tool results that pile up, a theme covered in auditing where your context window actually goes.
Not every client surfaces resources equally well. Before designing around them, check how your main client presents resource selection — some make it a first-class picker, others bury it, and a resource nobody can find is dead weight in your server.
Prompts: the server author’s expertise, packaged
A prompt in MCP is a named, parameterised template the server offers and the user invokes — think slash-command style, which is how the specification itself illustrates them. The server author, who knows the workflow best, writes the scaffolding once; the user triggers it and fills in the arguments.
The mechanics are small and deliberate:
- Clients list prompts with
prompts/listand fetch one withprompts/get, passing argument values. Arguments can be marked required, and clients can offer auto-completion for them. - A prompt returns one or more messages with roles (
userorassistant) — text, and where relevant image or audio content. - Prompt messages can embed resources, so a template can pull the style guide from the section above directly into the conversation it starts. That is the two primitives composing, and it is the cleanest way to ship “the workflow plus the reference it needs” as one item.
@mcp.prompt()
def review_draft(name: str) -> str:
"""Review a draft against the house style guide."""
return (
f"Review the draft '{name}' against the style guide. "
"List every deviation with the line it occurs on, "
"then give a corrected version of the worst three."
)
Good fits: a code-review prompt that always asks for the same structured critique, a “summarise this dataset” flow with a fixed output shape, a weekly-report routine. The value is consistency. Instead of every user re-inventing the phrasing, the template carries the author’s hard-won wording.
Prompts are user-controlled by design, which makes them the safest primitive of the four — nothing happens until a person asks. When you are deciding how much autonomy to give an agent setup overall, prompts sit at the deliberate end of the spectrum, the opposite pole from the always-available tool.
Sampling: the server borrows the client’s model — with a 2026 expiry notice
Sampling reverses the usual direction. A server, mid-task, asks the client to run a model completion — summarise this, classify that, draft a reply — using the client’s model and the user’s existing setup. The server needs no API key of its own and no separate billing relationship. The client declares a sampling capability, the server sends a sampling/createMessage request with messages and model preferences (priorities for cost, speed, and intelligence, plus optional model hints — never a hard model name), and the client picks the actual model. The 2025-11-25 specification also allows tool use inside sampling, so a sampled model can call tools in a loop the server drives.
That elegance comes with a trust cost. A sampling request is the server asking to spend the user’s model budget and to influence what the model sees. The specification says clients should keep user approval controls in that loop, and a server that leans heavily on sampling deserves the same hard look as one that asks for broad file access — vet it with the process in checking a server before you install it.
Now the part older articles miss. The protocol’s 2026-07-28 revision removed server-initiated requests — the mechanism sampling travels on — replacing them with multi-round-trip requests, where a server answers with an “input required” result and the client retries. Sampling itself, along with roots and logging, was formally deprecated in that revision, with a minimum twelve-month window before removal, and the suggested migration is for servers to call an LLM provider’s API directly. Current SDKs serve both protocol eras, so sampling still works against 2025-era clients today. The design conclusion is narrow and practical:
- Sampling is fine as an enhancement a server uses when the client offers it.
- Sampling must never be load-bearing. A server that cannot do its job without sampling has an expiry date printed on it.
- New designs that need a model judgement mid-workflow should price in a direct provider API call, with the server holding its own key — the direction the specification now points.
Three mistakes the decision table prevents
Reference data wearing a tool costume. A get_style_guide tool with no meaningful parameters is a resource that took the long way round. It costs a model decision and a round trip every time it is used, it can fail in ways a read cannot, and its result lands in context with no indication of whether it is current. If the honest description of a capability is “the model should have this text”, it is a resource.
A workflow smuggled into a tool parameter. The mirror image: a tool whose main argument is a long free-text instruction. The schema validates nothing, every caller phrases the job differently, and the consistency the server was supposed to provide evaporates. That is a prompt’s job — fixed wording, named arguments, invoked on purpose.
A server that only works with sampling. The quietest mistake, because it demos beautifully: the server’s core flow asks the client’s model to do the thinking, so the server itself is a shell. After the 2026-07-28 deprecation, that design is also the one with a deadline. If a judgement call is truly central, the server should make it through its own provider integration and treat sampling, at most, as a fallback.
The feature decision table
| If the job is… | Use | Why | Watch out for |
|---|---|---|---|
| Doing or computing something on demand | Tool | Model-initiated, schema-validated, auditable | Overly broad tools; unvalidated arguments |
| Offering stable content into context | Resource | User/client selects it deliberately; reusable | Clients surface resources unevenly |
| Packaging a repeatable workflow’s wording | Prompt | Author’s expertise, user-triggered, consistent | Templates nobody discovers or invokes |
| Needing a model judgement mid-workflow | Sampling | No separate key or billing for the server | Deprecated in the 2026-07-28 revision; spends the user’s budget |
| Returning the same reference data every session | Resource | Read once, referenced often | Stale content if the source changes silently |
| Letting the model decide when to act | Tool | That autonomy is the point | Needs the tightest permission scoping |
Print this next to your server sketch. Most beginner servers need only tools, and that is fine — add a second primitive when a real job demands it, not for completeness.
A worked example: one server, three primitives
Imagine a documentation server for a small product. As tools, it offers search_docs (parameterised, computed) and report_broken_link (an action). As resources, it exposes the current style guide and the product glossary — stable references a writer pulls in deliberately. As prompts, it ships draft_release_notes, a template that takes a version number, embeds the glossary resource, and produces notes in the house format.
Sampling is the one primitive it skips, because nothing in its workflow needs a mid-task judgement call — and after the 2026 revision, skipping it is also the future-proof choice. That restraint is typical of the servers in the shortlist of ones worth keeping: each uses the smallest set of primitives that covers its job. When a design like this grows toward shared or remote use, the operational questions change again — running MCP servers in production conditions covers that side, and the second-server pattern covers the validation, error, and versioning discipline that applies to every primitive equally.
How we researched this
The primitive definitions, control models, and message names in this article come from the official MCP specification — the resources, prompts, and sampling pages of the 2025-11-25 revision — and the sampling deprecation and multi-round-trip replacement from the 2026-07-28 revision’s published changes, all checked November 2026. Code examples follow the current Python SDK (MCPServer, SDK v2); the Python server tutorial builds a full tool-based server in the same style. meetBlogging is a desk-research site, so client-support claims are stated the way the specification states them: as things to verify in your client, not as behaviour we measured.
What to do next
Sketch your next server on paper and label every capability with its primitive before writing code. If everything lands on “tool”, ask whether one of them is really reference data or a repeatable workflow in disguise. The mcp-builder skill can scaffold the structure once your sketch is settled, and wiring servers into Claude Code covers the client side once the server exists.
FAQ
What is the difference between MCP tools, resources, and prompts? Tools are actions the model calls. Resources are data the application exposes for the model or user to read — files, schemas, documents. Prompts are reusable, templated workflows the user invokes deliberately. Same server, three different jobs, three different answers to “who decides”.
When should a capability be a resource instead of a tool? When it is reference data the model reads rather than an action it performs: a style guide, a price list, a database schema. Making reference data a tool forces a call — and a schema, and a failure mode — for something that should simply be available.
Do all MCP clients support resources and prompts? No — client support varies, and tools are the only primitive you can assume everywhere. Design so the server still works tools-only, and treat resources and prompts as upgrades for clients that support them.
Is sampling going away? It is deprecated, not deleted. The 2026-07-28 revision deprecated sampling with a minimum twelve-month window and removed the server-initiated request mechanism it travels on, pointing servers toward direct provider API calls instead. Existing servers keep working against current clients; new designs should not depend on it.
Why do most tutorials only teach tools? Because tools demo best: one call, one visible result. Resources and prompts pay off later, in servers used daily — which is why they are under-taught and worth the design pass this article describes.
Category: MCP Servers & Security · Tags: #mcp #ai-agents
Next step: this article is part of MCP guides, which covers the full topic from first setup to advanced use.