The Three Primitives
Resources: User-Controlled Data
What Are Resources?
Resources are read-only data that users can attach to their input. Key points:- User decides — not the agent
- Agent cannot access resources directly — it must use Tools
- Tools control access — authentication, scopes, permissions
Real-World Examples
The best example is the @ command in Cursor, Windsurf, and Android Studio:
When you type
@file.ts, you’re adding a resource to your prompt. The user explicitly chooses what context to include.
When to Use Resources
- Configuration files
- User profiles
- Project metadata
- Any read-only context users might want to attach
Resources are not for data the agent should fetch on its own. That’s what Tools are for.
Prompts: Instructions for Agents
What Are Prompts?
Prompts are instructions that tell the agent how to behave. They can be:- User-added — Explicitly attached by the user
- Agent-picked — Agent selects relevant prompts when needed
Real-World Examples
The best example is Guidelines in Cursor and Windsurf:
These are prompts — instructions that shape how the agent generates code.
When to Use Prompts
- Coding standards
- Review guidelines
- Documentation templates
- Any reusable instructions
Tools vs Resources vs Prompts
Client Support Reality
If your MCP needs broad client support, focus on Tools. Use Resources and Prompts as progressive enhancements for clients that support them.
Best Practices
For Resources
- Keep them read-only — Resources should never modify state
- Make them user-relevant — Only expose what users would want to attach
- Provide fallbacks — If resources aren’t supported, expose similar data via Tools
For Prompts
- Keep them focused — One prompt per behavior/task
- Make them reusable — Generic enough for multiple contexts
- Don’t duplicate — If it’s in the prompt, don’t repeat in tool descriptions
Summary
Key insight: Tools are LLM-focused (agent-driven). Resources and Prompts are UI-focused (user-driven). Build for Tools first, enhance with Resources/Prompts for supporting clients.
Tools Deep Dive
Learn about MCP tools
Resources Guide
Understanding resources

