Turning Point Academy · MCP Engineering

Server primitives — Cheat Sheet

MCP Engineering course · M1


This guide explains, from scratch and taking nothing for granted, the three primitives that every MCP server exposes: tools, resources and prompts. Read it slowly: if you understand what each one is and —above all— who controls it, you've already understood the heart of Module 1.

Revision taught: MCP specification 2026-07-28 (current). The worked JSON comes from the course's lab-l08 notes server (official Python SDK mcp 2.3.0, class MCPServer).

In one sentence

An MCP server doesn't expose "just anything": it offers exactly three types of capabilities, and we call those three types primitives. A primitive is simply a basic building block of the protocol. The most important idea in the whole lesson is this: each primitive has a different controller — the model, the application or the user. That separation is no accident: it's the design.

The three primitives at a glance

PrimitiveWho controls itWhat it's forProtocol methods
ToolsThe model (the LLM decides to invoke it)Actions: run functions (create an event, send a message)tools/list, tools/call
ResourcesThe application (the host decides)Read-only data (files, images, JSON) addressed by URIresources/list, resources/read, resources/templates/list
Prompts (templates)The user (triggers them on purpose)Reusable templates of instructions, e.g. a slash command /…prompts/list, prompts/get

1. Tools — controlled by the model

A tool is a function that the server makes available and that the LLM decides to invoke on its own when it thinks it needs it. They are actions: they do something (search an API, write to a database, send a message). The model reads the list of available tools, picks one and runs it with whatever data is needed.

2. Resources — controlled by the application

A resource is read-only data: a file, an image, a JSON, a text. It runs no actions; it only delivers information to provide context. Each resource is identified by a URI (a unique address, similar to a web address).

3. Prompts (templates) — controlled by the user

A prompt is a reusable template of instructions, designed for the user to trigger on purpose. The typical case is a slash command (a command that starts with /) that assembles a ready-made message.

The key idea: three different controllers

Notice the pattern. The three primitives differ above all by who decides to use them:

Why does this separation matter so much?

Because it makes a server predictable. If everything were decided by the model, you'd never know what it's going to touch or when. By splitting control, each actor has its lane: the user triggers templates when they want, the app decides what data enters as context, and the model can only act through tools someone exposed to it.

The split describes who decides when; it does not make a server safe on its own. Safety additionally needs host consent, input validation, access control and least privilege in the server. Servers MUST validate all tool inputs.

What a tool definition and result look like (2026-07-28)

From the running lab-l08 server (trimmed). Because get_note returns a Pydantic model, the SDK publishes an outputSchema and returns structuredContent:

{"name":"get_note","title":"Get a note by id",
 "description":"Return one note by its id (format N-001).",
 "inputSchema":{"type":"object","properties":{"note_id":{"type":"string","description":"Note id such as N-001"}},"required":["note_id"]},
 "outputSchema":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}}},"required":["id","title","body","tags"]},
 "annotations":{"readOnlyHint":true,"openWorldHint":false}}
{"jsonrpc":"2.0","id":2,"result":{
  "resultType":"complete","isError":false,
  "content":[{"type":"text","text":"{\n  \"id\": \"N-001\", ... }"}],
  "structuredContent":{"id":"N-001","title":"Demo: buy cables","body":"Two demo USB-C cables.","tags":["demo","shopping"]}}}

Two kinds of error

KindShapeUse it for
Tool execution errora result with isError: trueAPI failures, invalid input values, business rules. Clients SHOULD pass it to the model so it can correct itself.
Protocol errora JSON-RPC error, e.g. {"code": -32602, "message": "Unknown tool: invalid_tool_name"}Unknown tools, malformed requests, server faults.

SDK behaviour: in mcp 2.3.0, an unknown tool came back as isError: true with Unknown tool: nope, not as a JSON-RPC -32602. Clients should handle both shapes.

Definitions, annotations and caching

⚠️ Watch out for tool design: exposing too many tools inflates the model's context and confuses it — less is more. How many and which to expose is a debated topic among those who build servers; it's covered in depth in an advanced module. For now, keep it on your radar.

One-line examples

Glossary

To remember

  1. A server exposes three primitives: tools, resources and prompts.
  2. What distinguishes them is who controls them: Tools = model, Resources = application, Prompts = user.
  3. Each one has its pair of methods: list what's available + use a specific one.
  4. That separation of control makes the server predictable; safety additionally needs host consent, input validation and least privilege.
  5. Tool errors are results with isError: true; protocol errors are JSON-RPC errors.
  6. Annotations are untrusted hints unless the server is trusted.

Turning Point Academy · MCP Engineering course · Module 1 · Lesson 4 (L04) · V2, spec 2026-07-28