The Three MCP Primitives
Different control semantics for different use cases
Tools
Model-controlled
Functions the LLM decides when to call
Use when
Actions that modify state (create, update, delete)
Computations or transformations
External API calls
Anything the AI invokes based on user intent
Resources
App-controlled
Data the host application loads for context
Use when
Configuration files and schemas
Documentation and knowledge bases
Database schemas (not data)
Read-only background context
Prompts
User-controlled
Reusable templates the user selects
Use when
Common workflows users repeat
Templates combining multiple tools
Guided experiences with specific output
Slash commands and menu items
A common mistake is putting everything into tools. MCP gives you three distinct primitives, each with different control semantics. Using the right one for the right job makes your server more predictable, secure, and useful.
MCP Primitive Matrix
Four primitive types and their data flow directions
| Primitive | Direction | Invocation | Examples |
|---|---|---|---|
| Tools | Server → Client | Client calls server | query_database, send_email |
| Resources | Server → Client | Client reads data | file contents, DB schemas |
| Prompts | Server → Client | User selects template | Summarize this PR, Debug this error |
| Sampling | Client → Server | Server requests LLM | Server asks host to generate text |