Skip to content
AgenticAIWiki
  1. Learn
  2. Part 7
  3. 35. MCP explained
  4. 35.3

Lesson 35.3 · 3 of 6 · 5 min read · Reviewed 24 Nov 2026

Tools, resources and prompts

By the end, you can

  • Distinguish tools, resources and prompts in MCP.
  • Pick the right primitive for a capability.

An MCPModel Context Protocol (MCP): An open protocol that standardises how AI applications connect to tools, data and prompts through servers. server can offer three kinds of things.

Primitive Who decides to use it Example
Tools The model create_issue, run_query, send_message
Resources The application or user A file, a table schema, a log, identified by a URI
Prompts The user A “summarise this PR” template, shown as a slash command

Tools

Actions with side effects or lookups. Each has a name, description and input schema, just like API tools (chapter 33).

Resources

Read-only data with a URI such as postgres://db/schema or file:///repo/README.md. The host decides when to pull them into context, for example when the user attaches one.

Prompts

Parameterised templates the server author recommends. In Claude Code, MCP prompts appear as slash commandsSlash command: A reusable prompt saved as a file and run in a coding agent by typing / and its name..

Clients can offer things too

The protocol also lets clients offer capabilities to servers, such as asking the user for more information mid-task. You’ll meet these in more advanced servers.

Key points

  • Tools are actions the model can call, such as create_issue.
  • Resources are data the app can read into context, such as a file or a database schema.
  • Prompts are reusable templates a user can pick, often shown as slash commands.
Hands-on labRuns in the Playground

Design a server's tools, resources and prompts

Decide which MCP primitive fits each capability of a server by asking who chooses to use it.

You will have: A capability map for an analytics MCP server, printed as tools, resources and prompts with a reason for each.

Steps

  1. Read the list of capabilities the analytics team wants to expose.
  2. For each one, record who decides to use it: the model, the app or user, or the user picking a template.
  3. Write primitive_for(chooser) that maps the chooser to tool, resource or prompt.
  4. Give every resource a URI and every tool an input schema.
  5. Print the grouped map and check the counts.

Done when

  • run_query and export_csv are tools; the schema and the metrics glossary are resources.
  • The weekly-report template is a prompt.
  • Every resource has a URI that starts with a scheme such as analytics://.

Open in the Playground No API key needed.

Starter code (Python)
capabilities = [
    ("run_query",       "model", "Run a read-only SQL query"),
    ("table_schema",    "app",   "The schema of every table"),
    ("weekly_report",   "user",  "A template that drafts the weekly metrics report"),
    ("export_csv",      "model", "Export a query result as CSV"),
    ("metrics_glossary","app",   "Definitions of each business metric"),
]

def primitive_for(chooser):
    # TODO: "model" -> "tool", "app" -> "resource", "user" -> "prompt"
    return "tool"

server = {"tools": [], "resources": [], "prompts": []}
for name, chooser, what in capabilities:
    kind = primitive_for(chooser)
    entry = {"name": name, "description": what}
    # TODO: resources need a "uri" such as analytics://schema/<name>
    # TODO: tools need an "inputSchema"
    server[kind + "s"].append(entry)

for kind, items in server.items():
    print(kind, [i["name"] for i in items])
Show a solution
capabilities = [
    ("run_query",       "model", "Run a read-only SQL query"),
    ("table_schema",    "app",   "The schema of every table"),
    ("weekly_report",   "user",  "A template that drafts the weekly metrics report"),
    ("export_csv",      "model", "Export a query result as CSV"),
    ("metrics_glossary","app",   "Definitions of each business metric"),
]

def primitive_for(chooser):
    return {"model": "tool", "app": "resource", "user": "prompt"}[chooser]

server = {"tools": [], "resources": [], "prompts": []}
for name, chooser, what in capabilities:
    kind = primitive_for(chooser)
    entry = {"name": name, "description": what}
    if kind == "resource":
        entry["uri"] = f"analytics://docs/{name}"
    if kind == "tool":
        entry["inputSchema"] = {"type": "object", "properties": {"sql": {"type": "string"}}, "required": ["sql"]}
    server[kind + "s"].append(entry)

for kind, items in server.items():
    print(kind, [i["name"] for i in items])
assert all(r["uri"].startswith("analytics://") for r in server["resources"])
print("counts:", {k: len(v) for k, v in server.items()})
Quick checkA server wants to offer the database schema as reference material, not as an action. Which primitive fits?
How sure are you?
Pick an answer and how sure you are