NewAI Content Creation is now live in Early Access
Turning Point Academy
0%
Module 1 — Inside the protocolLesson 2 of 4
4 min readBeginner
Downloads & resources
Grab this lesson's prompts and skills, ready to use.

Client primitives: when the server asks something of you

Example prompt

Level: from scratch. If you're coming from Module 1 (where the server offered things), here the roles flip: now it's the server that asks something of the client. Read it calmly; every term is explained.

In Module 1 you learned the server primitives (tools, resources, prompts): things the server exposes for the host to use. In this lesson we look at the other side of the protocol: the client primitives, three capabilities that the client offers back to the server. They are what enable richer, more "agentic" servers (that reason and act over several steps).

Key fact: all three are optional and are activated through capability negotiation — a handshake at connection time where each side states what it supports. If the client doesn't offer it, the server can't use it.

What you'll learn

  • The three client primitives: sampling, roots, and elicitation.
  • Why sampling is the most important: it makes model-independent servers possible.
  • How these primitives invert the roles compared to Module 1.

1. Sampling — "ask the host's brain to think"

What it is: with sampling/createMessage, the server asks the host to generate a response with its LLM (the language model, the AI "brain"). The server doesn't bring or pay for its own model: it uses the host's.

Analogy: you're a chef (server) who needs an expert opinion, but instead of hiring your own sommelier, you ask the house sommelier (the host). You don't pay their salary and the client stays in control.

2. Roots — "this is as far as you can operate"

What it is: the boundaries (folders or URIs) within which the server can work. A URI is the address of a resource (like file:///project/ or a web page).

Analogy: you lend your house to someone but tell them "you can use the kitchen and the living room, not the bedrooms". Roots marks those doors.

3. Elicitation — "I need to ask you something midway"

What it is: the server asks the user for structured data in the middle of an operation — for example, "confirm the deletion?" or "which date do you want?".

Analogy: the electrician is working and pauses for a second: "do you want the outlet on the left or the right?". They don't guess; they ask you and continue.

Why sampling matters so much (model independence)

Without sampling, every server would have to include and pay for its own AI model. With sampling, the server only asks for a response and the host provides the model. That means:

  • Model-independent: the same server works with any LLM the host uses.
  • Privacy and control stay on the client/host side, not the server's.
  • Server-driven agents become possible without being tied to an AI provider.

Quick glossary

  • Client primitive: capability that the client offers the server (the roles are inverted).
  • Sampling: the server asks the host to generate text with its LLM (sampling/createMessage).
  • Roots: the boundaries of folders/URIs where the server can operate.
  • Elicitation: the server asks the user for structured input midway through an operation.
  • Capability negotiation: the initial agreement where each side declares what it supports.
  • LLM: language model; the AI "brain" that generates responses.

To download

  • 📄 Cheat sheet — Client primitives (1-page PDF: what each one does and why it matters).

Before you continue

If you take away one idea: in Module 1 the server offered; here the server asks. And the piece that changes everything is sampling, because it frees the server from bringing its own model.