Primitives

Sampling, roots and elicitation

Messages can also flow from server to client. These three features let a server borrow the host's model, learn its boundaries, and ask the human a question, without bypassing the user.

Sampling

The server sends sampling/createMessage. The host runs its own LLM, so the server needs no API keys.

server: “summarise these 40 logs” host: user reviews the request host LLM → completion → server

The user stays in control: they can see and edit both the prompt and the result.

Roots

The client declares which places the server should work in. If they change, it sends notifications/roots/list_changed.

file:///Users/me/shop-api

file:///Users/me/shop-web

~/Documents (not shared)

Roots are guidance for well-behaved servers, not a sandbox. Enforce real boundaries elsewhere.

Elicitation

Mid-task, the server sends elicitation/create with a message and a schema. The host renders a form.

Which environment should I deploy to?

stagingproduction
DeclineAccept

The user can accept, decline or cancel. Never use elicitation to ask for passwords or secrets.

14 / 28