MCP Tools vs Resources vs Prompts: When to Use Each

MCP servers can expose three types of capabilities: tools, resources, and prompts. They're not interchangeable — each one is controlled by a different actor and used for a different purpose.

MCP servers expose three types of capabilities: tools, resources, and prompts. Developers often use "tool" to mean any of them — but they behave differently because they're controlled by different actors. Getting this right affects how your server integrates with AI clients.

The short answer

ToolsResourcesPrompts
Controlled byThe AI modelThe host applicationThe user
Side effectsYes — intended to actNo — read-onlyNo — just text
InvokedAutomatically by the LLMLoaded by the client appExplicitly by the user
ExamplesSend email, run query, call APIFile contents, database record, docs/summarize, /review-pr, slash commands
xmcp directorysrc/tools/src/resources/src/prompts/

The key question for any capability: who should decide when this is used?

Tools — the AI decides

Tools are functions the AI model can call autonomously based on the conversation. When a user says "check the weather in Tokyo," the model decides to call your get_weather tool — the user never explicitly invokes it.

Use a tool when:

  • The capability performs an action or has side effects (writing data, calling an API, sending a message)
  • The model should be able to discover and use it automatically based on context
  • The output feeds back into the conversation
src/tools/send-email.ts

Resources — the application decides

Resources are read-only data sources that a client application loads into context. The AI model doesn't invoke resources directly — the host app (Claude Desktop, Cursor, etc.) fetches them and makes their content available.

Think of resources as the "what the AI can read" layer, not the "what the AI can do" layer. They have stable URIs and are fetched by address.

Use a resource when:

  • You're exposing static or semi-static data (a file, a config, a knowledge base entry)
  • The content should be readable but not modified
  • The client application — not the model — decides when to load it
src/resources/company-docs.ts

Prompts — the user decides

Prompts are reusable, parameterized instruction templates that users invoke explicitly — like slash commands in Slack or Claude's / menu. The model doesn't call prompts autonomously; the user picks one and fills in any parameters.

Use a prompt when:

  • You want to give users a structured, repeatable way to kick off a task
  • The interaction is user-initiated, not model-initiated
  • You're standardizing how a common task is described to the model
src/prompts/review-code.ts

The mental model

If you're unsure which primitive to use, ask:

  1. Should the AI decide when to use this? → Tool
  2. Is this data the app should pre-load for context? → Resource
  3. Should the user explicitly choose this interaction? → Prompt

Most MCP servers only need tools. Resources and prompts are powerful but narrower — use them when you have a clear use case for the non-model-controlled interaction.

How xmcp maps to this

xmcp follows the file-based convention: each capability lives in its own directory and file. Drop a file, get a registered capability:

No manual registration. xmcp discovers and registers everything at build time.

Next steps

One framework to rule them all