MCP Primitives

The core types of context and capability that MCP clients and servers can expose to each other. Primitives are declared during the initialization handshake and discovered via */list methods.

Server Primitives

These are exposed by MCP servers and consumed by the host’s AI application.

PrimitiveDescriptionExample
ToolsExecutable functions the AI can invokeFile operations, API calls, database queries
ResourcesData sources providing contextual informationFile contents, DB records, API responses
PromptsReusable templates for structuring LLM interactionsSystem prompts, few-shot examples

A single server can expose all three. Example — a database MCP server might expose:

  • A tool for querying the database
  • A resource containing the database schema
  • A prompt with few-shot examples for interacting with query tools

Discovery Pattern

Each primitive type follows the same method pattern:

MethodPurpose
*/listDiscover available primitives (e.g. tools/list, resources/list)
*/getRetrieve a specific primitive
tools/callExecute a tool

Listings are dynamic — the server controls what appears in */list at any given time.

Tool discovery and execution example

// List request
{ "jsonrpc": "2.0", "id": 2, "method": "tools/list" }
 
// Tool call
{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "tools/call",
  "params": {
    "name": "weather_current",
    "arguments": { "location": "San Francisco", "units": "imperial" }
  }
}

Tool responses return a content array supporting multiple content types (text, images, resources).

Client Primitives

These are exposed by the MCP client (i.e. the host application) and available to MCP servers. They let server authors build richer interactions without coupling to a specific LLM.

PrimitiveMethodDescription
Samplingsampling/completeServer requests an LLM completion from the host — model-independent
Elicitationelicitation/requestServer requests additional input or confirmation from the user
LoggingServer sends log messages to the client for debugging/monitoring

Sampling is particularly important for agent use cases: a server can trigger LLM reasoning without bundling an LLM SDK or being tied to a specific model.

Tasks (Experimental)

Durable execution wrappers that enable deferred result retrieval and status tracking for MCP requests. Useful for:

  • Expensive computations
  • Workflow automation
  • Batch processing
  • Multi-step operations

See Also

  • mcp — what MCP is and why it exists
  • mcp-architecture — hosts, clients, servers, transport, lifecycle