Primitives

Resources: list and read

Two calls do most of the work: one says what exists, the other fetches it by URI.

1 List what's available

resources/list → resultjson
{  "resources": [{    "uri": "calc://history",    "name": "recent",    "title": "Recent results",    "description": "The last calculations, newest first.",    "mimeType": "text/plain"  }]}

2 Read one by URI

host → serverjson
{  "method": "resources/read",  "params": { "uri": "calc://history" }}
resources/read → resultjson
{  "contents": [{    "uri": "calc://history",    "mimeType": "text/plain",    "text": "48213 + 97356 = 145569\n2 + 3 = 5"  }]}

Templates

resources/templates/list returns patterns like calc://constants/{name}. The host fills in the name and reads calc://constants/pi.

Subscriptions

If the server supports it, after resources/subscribe it sends notifications/resources/updated when the data changes, and the host reads it again.

The URI is the handle. Listing and reading are calls the host makes: a resource's contents reach the model only when the host puts them in the conversation.

11 / 28