MCP Tools, Resources, and Prompts
Snapshot
~75 sec
MCP servers can expose tools, resources, and prompts. Tools request actions, resources provide context, and prompts offer reusable message templates. A client first discovers what a server offers, then selects the smallest primitive that matches the developer's intent.
You will learn
- Distinguish an action-oriented tool from read-oriented resource context and a reusable prompt template.
- Trace discovery before primitive use instead of assuming a fixed server surface.
- Choose an appropriate primitive for a console read, project summary, and diagnosis workflow.
Target outcome
You can choose tools, resources, and prompts by responsibility rather than treating every MCP capability as a tool call.
Visual walkthrough
Visual walkthrough
~6 min
Three primitives, three jobs
Tool
A callable operation with declared inputs and outputs, such as reading filtered console entries.
Resource
Addressable context a client can read, such as a read-only summary of project version and active build target.
Prompt
A reusable message template that helps structure a workflow, such as a generic scene-diagnosis checklist.
Discover first, then use the smallest primitive
The client learns the connected server's current surface before it selects a primitive. Discovery is not permission to use every capability.
Name the intent
Example: explain the newest error without changing the project.
scopesDiscover capabilities
The client requests the available tools, resources, or prompts from the server.
offersChoose one primitive
Select read_console rather than loading unrelated context or invoking a write.
read_console(severity: "error", limit: 10)returnsInspect the result
Use the bounded output as evidence, then verify the diagnosis before acting.
The client learns the connected server's current surface before it selects a primitive. Discovery is not permission to use every capability. Reading order
- Name the intent
Example: explain the newest error without changing the project.
- Discover capabilities
The client requests the available tools, resources, or prompts from the server.
- Choose one primitive
Select read_console rather than loading unrelated context or invoking a write.
read_console(severity: "error", limit: 10) - Inspect the result
Use the bounded output as evidence, then verify the diagnosis before acting.
Connection explanations
- Name the intent → Discover capabilities (scopes)
A clear intent keeps discovery focused on the capability actually needed.
- Discover capabilities → Choose one primitive (offers)
Discovery tells the client what exists; the client still selects only the matching primitive.
- Choose one primitive → Inspect the result (returns)
A primitive returns context or a result that must be interpreted and verified.
Choose by responsibility
Approach Primary job Game-development example Control question ToolRequest a bounded operation from the server. Perform an action or query with explicit arguments and a structured result. read_console filters an invented Unity console by severity and result limit. Is the operation read-only or a write, and what approval or validation does it require? ResourceRead addressable context without pretending it is an action. Provide context the client can identify and retrieve when it becomes relevant. project://summary returns a read-only engine version, active target, and package-count summary. Is the resource bounded, current, and free of secrets or unrelated project data? PromptOffer a reusable structure for a human-guided interaction. Prepare messages or questions for a repeatable workflow without performing the work itself. diagnose_scene_issue asks for the symptom, relevant object, evidence, and a verification plan. Does the template clarify the task without implying that its recommendations are already approved? Choose the right primitive
A client needs three capabilities: fetch the latest filtered console errors, read a stable project summary, and offer a repeatable diagnosis questionnaire. Which primitive fits each one?
Expected reasoning
Use a tool for the bounded read_console query, a resource for the read-only project summary, and a prompt for the reusable diagnosis questionnaire. The server may expose all three, but discovery and host policy still determine what the client can use.
Go deeper
- Model Context Protocol: Server conceptsOfficial definitions and control models for tools, resources, and prompts.