AI › Concept

Comparing MCP primitives across Tools, Resources, and Prompts

Understand how MCP separates Tools for actions, Resources for read-only URI data, and Prompts for user-driven templates with JSON-RPC payloads.

Comparing MCP primitives across Tools, Resources, and Prompts

When you first read the Model Context Protocol spec, it’s fair to ask why MCP splits context into Tools, Resources, and Prompts instead of exposing everything as a function. Wrapping read-only data and reusable workflows inside generic functions blurs security boundaries and wastes round-trips. This post compares the three primitives, their control owners, and their JSON-RPC 2.0 payloads.


Comparing the three MCP primitives

Over the Host-Client-Server architecture, an MCP server exposes capabilities through three distinct primitives: Tools, Resources, and Prompts.

flowchart TD
    subgraph Primitives ["MCP Server Primitives"]
        T["Tools (Actions)"]
        R["Resources (Read-only Data)"]
        P["Prompts (Templates)"]
    end

    subgraph Actors ["Control Owners"]
        User["User (Human)"]
        App["Host Application"]
        Model["LLM Engine"]
    end

    User -->|"1. Pick template + args"| P
    P -->|"Assemble messages"| App
    App -->|"2. Attach URI data"| R
    App -->|"Send combined context"| Model
    Model -->|"3. Trigger action (Side Effect)"| T

Each primitive differs in who initiates it, whether it mutates state, and how the host presents it:

DimensionToolsResourcesPrompts
Control ownerModel-controlled (LLM decides)Application-controlled (Host or user attaches)User-controlled (Human picks explicitly)
Side effectsYes (DB writes, emails, API mutations)No (Read-only, safe and idempotent)No (Message template assembly)
IdentifierFunction nameRFC 3986 URI (file://, postgres://)Template name
Host UXGate behind HITL approvalBackground fetch and live subscriptionsSlash commands (/) or UI menus
Examplescancel_order, send_slackfile:///var/log/app.log, DB schema/code-review, /incident-triage

Tools for model-driven actions with side effects

Tools are executable actions that the LLM invokes on its own when solving a task. Because a tool can mutate databases, trigger refunds, or call external APIs, it carries real side effects—and requires host-side guardrails like allowlists or human confirmation.

Discovering tools (tools/list)

After the initialization handshake, the client asks the server for its tool catalog:

1
2
3
4
5
6
{
  "jsonrpc": "2.0",
  "id": 10,
  "method": "tools/list",
  "params": {}
}

The server replies with each tool’s name, description, and JSON Schema inputSchema:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{
  "jsonrpc": "2.0",
  "id": 10,
  "result": {
    "tools": [
      {
        "name": "cancel_order",
        "description": "Cancel payment and initiate a refund for the specified order ID.",
        "inputSchema": {
          "type": "object",
          "properties": {
            "orderId": {
              "type": "string",
              "description": "Unique identifier of the order to cancel"
            },
            "reason": {
              "type": "string",
              "description": "Cancellation and refund reason"
            }
          },
          "required": ["orderId", "reason"]
        }
      }
    ]
  }
}

Invoking a tool (tools/call)

When the model decides to run cancel_order, the client forwards the structured call:

1
2
3
4
5
6
7
8
9
10
11
12
{
  "jsonrpc": "2.0",
  "id": 11,
  "method": "tools/call",
  "params": {
    "name": "cancel_order",
    "arguments": {
      "orderId": "ORD-20251124-001",
      "reason": "Customer requested immediate cancellation"
    }
  }
}

The server executes the business logic and returns a content array along with an isError flag:

1
2
3
4
5
6
7
8
9
10
11
12
13
{
  "jsonrpc": "2.0",
  "id": 11,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "Order ORD-20251124-001 has been canceled (Refund ID: RF-8821)."
      }
    ],
    "isError": false
  }
}

Resources for read-only URI data and subscriptions

Resources expose read-only context—source files, SQL schemas, error logs, or OpenAPI specs—addressed by standard RFC 3986 URIs (such as postgres://production-db/tables/orders/schema or file:///workspace/README.md).

Because reading a resource has no side effects, the host can prefetch or attach it without interrupting the user for permission.

Reading a resource (resources/read)

1
2
3
4
5
6
7
8
{
  "jsonrpc": "2.0",
  "id": 20,
  "method": "resources/read",
  "params": {
    "uri": "postgres://production-db/tables/orders/schema"
  }
}

The server returns either plain text or base64-encoded binary blob content with its MIME type:

1
2
3
4
5
6
7
8
9
10
11
12
13
{
  "jsonrpc": "2.0",
  "id": 20,
  "result": {
    "contents": [
      {
        "uri": "postgres://production-db/tables/orders/schema",
        "mimeType": "application/sql",
        "text": "CREATE TABLE orders (\n  order_id VARCHAR(32) PRIMARY KEY,\n  customer_id VARCHAR(32) NOT NULL,\n  total_amount NUMERIC(12, 2) NOT NULL,\n  status VARCHAR(20) NOT NULL,\n  created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()\n);"
      }
    ]
  }
}

Subscribing to live updates (resources/subscribe)

Unlike static function outputs, resources support push notifications when underlying data changes—useful for tailing error logs or live metrics:

1
2
3
4
5
6
7
8
{
  "jsonrpc": "2.0",
  "id": 21,
  "method": "resources/subscribe",
  "params": {
    "uri": "log://server/errors/today"
  }
}

Whenever a new error lands, the server notifies the client so the host can refresh its context:

1
2
3
4
5
6
7
{
  "jsonrpc": "2.0",
  "method": "notifications/resources/updated",
  "params": {
    "uri": "log://server/errors/today"
  }
}

Prompts for user-driven workflow templates

Prompts are parameterized conversation templates authored by the server team and surfaced in the host UI (typically as slash commands like /incident-triage or /code-review).

The user—not the LLM—explicitly selects a prompt and fills in its arguments. A prompt can also embed references to relevant Resources so the host assembles instructions and context together.

Fetching an assembled prompt (prompts/get)

1
2
3
4
5
6
7
8
9
10
11
12
{
  "jsonrpc": "2.0",
  "id": 30,
  "method": "prompts/get",
  "params": {
    "name": "incident-triage",
    "arguments": {
      "ticketId": "INC-9942",
      "severity": "CRITICAL"
    }
  }
}

The server renders the template into a structured messages array ready to send to the LLM:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
  "jsonrpc": "2.0",
  "id": 30,
  "result": {
    "description": "Incident ticket root-cause analysis and initial mitigation template",
    "messages": [
      {
        "role": "user",
        "content": {
          "type": "text",
          "text": "Analyze CRITICAL incident ticket INC-9942. Inspect the attached system resources and diagnostic tools to identify the root cause and propose an immediate mitigation."
        }
      }
    ]
  }
}

Combining all three primitives in incident triage

In production, these three primitives work together in a single workflow rather than in isolation. Here’s how an on-call engineer triages a database outage through an internal MCP server:

sequenceDiagram
    autonumber
    actor Engineer as On-call Engineer
    participant Host as Host (MCP Client)
    participant Server as Incident MCP Server
    participant LLM as LLM Engine

    Engineer->>Host: Run /incident-triage (ticketId=INC-9942)
    Host->>Server: prompts/get (INC-9942)
    Server-->>Host: Rendered triage messages

    Host->>Server: resources/read (log://service/incidents/INC-9942)
    Server-->>Host: Stack trace + environment snapshot

    Host->>LLM: Send prompt messages + log resource
    Note over LLM: Identifies DB connection pool exhaustion

    LLM-->>Host: Request Tool: scale_connection_pool(size=50)
    Host->>Engineer: Confirm state change (scale pool to 50?)
    Engineer-->>Host: Approved

    Host->>Server: tools/call (scale_connection_pool, size=50)
    Server-->>Host: Execution succeeded
    Host->>LLM: Return tool result for final report
    LLM-->>Engineer: Summary + follow-up prevention steps

Compare that to a legacy function-calling setup where everything is a tool:

  1. Fewer round-trips and tokens: Instead of forcing the LLM to discover and call get_logs(), the host prefetches the incident Resource upfront.
  2. Centralized team playbooks: SRE triage instructions live in version-controlled server Prompts rather than getting copy-pasted across personal chat windows.
  3. Clear security boundaries: Because scale_connection_pool is explicitly modeled as a Tool with side effects, the host knows to pause for human approval without gating read-only log access.

Design boundaries and takeaway checklist

Don’t force every endpoint into a Tool just because Tools feel familiar—and don’t over-engineer Resources when your host doesn’t expose a resource picker yet. Some MCP clients only support tools/call today, so check your target host’s declared capabilities before relying on resources/subscribe or prompts/get.

Primitive design checklist

  • Model mutations and dynamic queries as Tools: Anything that writes state, triggers external actions, or requires the LLM to choose search parameters belongs in tools.
  • Model static or addressable context as Resources: Schemas, config files, and logs identified by URI belong in resources so hosts can attach them safely without approval prompts.
  • Model repeatable team workflows as Prompts: Put standard runbooks, review checklists, and triage templates in prompts so every engineer runs the same versioned instructions.
  • Verify client capabilities first: Inspect the initialize handshake before assuming every connected host renders Prompts or subscribes to Resource updates.
This post is licensed under CC BY 4.0 by the author.