Three capabilities: tools, resources, prompts

Every MCP server can expose three types of capabilities. Each serves a different purpose and is controlled by a different part of the system. Let's break them down.

Tools are model-controlled. These are functions the LLM can decide to call, like search_papers(), send_message(), and create_issue(). Tools can have side effects (creating a ticket, sending a message). The LLM sees the tool list, decides when to call them, and provides the arguments.

Resources are application-controlled. Think of them as read-only data endpoints, similar to REST GET endpoints. The application (not the LLM) decides when to read them. Examples: wiki://topics for a list of cached topics, file:///logs/app.log for log data. Resources have no side effects and simply provide context.

The key difference is standardization. With a raw API, every data source has a different interface, auth mechanism, and response format. An MCP resource gives you a single, consistent way to read data from any server. Your app calls session.read_resource() and it works the same whether the data comes from a filesystem, a database, or a wiki.

Prompts are user-controlled. These are pre-defined templates for common AI workflows, essentially recipes the server provides. For example, a 'Summarize for a beginner' prompt or a 'Compare two papers' workflow. Users select which prompt to use, and the server fills in the template.

Here's the quick decision guide: - Does the LLM need to decide when to call it? Use a Tool. - Does the app need background context? Use a Resource. - Is it a pre-built workflow for users? Use a Prompt. Another way to think about it: Tools have side effects (they do things). Resources are read-only (they provide data). Prompts are templates (they structure interactions).

Matching exercise: Who controls what?

Loading practice…

Quiz: Quiz

Loading practice…