---
title: MCP resources
description: "What a client can fetch by URI: the file behind an answer, a sleep run's report, and a memory pinned at a commit."
---

## 1. What a resource is for

The three resources: design.md §8's two, plus one version-pinned citation grain.

A resource is for CITATION-grade drill-down: a client that got a path from `memory_search` can
fetch `memhtml://file/<path>` and show a human the file behind an answer, without spending a tool call
and without the tool response having had to carry the whole body.

`memhtml://file/{path}` and `memhtml://at/{commit}/{path}` are the same read at two grains, and the
difference is whether the answer can move. A path is the id of a memory and a correction rewrites
what lives at it, so a receipt citing a path alone cites whatever is there when someone follows it.
The pinned form names a commit as well, and a commit sha is immutable, so the bytes behind that URI
are the bytes the receipt was written against. This is a grain only a git-native store can offer, and
`memory_resolve` is the other half: one URI says what was true, the other says where the fact went.

## 2. The templates

A client fills in the braced parameter and fetches the result. Each row is one template the server publishes, with the MIME type the content arrives as.

| URI template | Name | MIME type | Description |
| --- | --- | --- | --- |
| `memhtml://file/{path}` | Memory file | `text/plain` | One memory's title, claim, and body text, by repo-root-relative path. For showing a human the file behind an answer. |
| `memhtml://sleep/{run-id}` | Sleep run report | `text/html` | One sleep run's committed HTML report: per-phase counts, commits, and what the run changed. |
| `memhtml://at/{commit}/{path}` | Memory file at a commit | `text/plain` | One memory's title, claim, and body text as of a specific commit sha. For a citation whose bytes cannot move: the path may since have been corrected, archived, or evicted. A branch name or HEAD is refused. |

## 3. Provenance

A loader generates this page from `apps/mcp/src/resources.ts` while the site builds, so no file in the repository holds it: each row is read from the resource declaration's own `uriTemplate` and checked against `RESOURCE_TEMPLATES`; a disagreement fails this build. Change the registry and this page changes with it.