Lv.1 0 XP

MCP Three Primitives — Tools, Resources, and Prompts

⚡ Exam Tested 10 min +40 XP
💡
THE ANALOGY

A contractor's toolkit. Tools are the power tools — they do work and can change things (drill, saw). Resources are the reference materials — they provide information without changing it (blueprints, building codes). Prompts are the workflow templates — pre-written instructions for how to approach standard jobs (standard operating procedures). Each has a distinct role and you wouldn't use one where another belongs.

⚠️ EXAM TRAP — The Wrong Answer People Choose

Using Tools when Resources are the right primitive. If you're exposing read-only data access, a Resource is architecturally correct — it signals to Claude that this is data to read, not an action to take. Using a Tool for read-only data access works but is semantically wrong and misguides Claude's reasoning.

KEY POINTS
1 Tools are callable functions that Claude invokes to take actions or retrieve dynamic data — they can have side effects.
2 Resources are data sources that Claude can read — they are read-only, have URIs, and represent persistent data.
3 Prompts are reusable prompt templates that users or clients can invoke — they structure how Claude approaches specific tasks.
4 The distinction matters architecturally: Tools signal action, Resources signal data access, Prompts signal workflow.
5 MCP servers expose all three primitives — clients (Claude) discover what's available and use them appropriately.