MCP tools
All tools take an optional project slug or repo key; when both are missing the X-Mimir-Repo header decides, and a project is created on first write. Paths are lowercase and use a-z0-9._/-; .. is refused rather than normalised.
memory_digest
Arguments: budget_tokens (default 800). Returns { text, memoryCount, truncated }: the one-line title of every memory, plus the full summary of the five most recently updated, grouped by top-level directory. Deterministic and cheap — call it once at session start.
memory_search
{"query":"how are refresh tokens rotated","path_prefix":"auth","limit":10}Returns hits with path, title, summary and a fused score. Vector and keyword results are combined with reciprocal rank fusion, so a score is a rank artefact, not a similarity: compare order, never the number.
memory_read
Arguments: path, optional depth (summary for L0+L1 only). Returns the body unless depth asks for less.
memory_write
{"path":"deploy/rollback","body":"Roll back with the previous image tag.","title":"Roll back by tag"}One path is one memory: writing it again replaces the body and clears the generated summary, so extraction runs on the new text. Returns { path, created }.
memory_tree
Arguments: path (a prefix, default the root) and depth (default 3). Directories are virtual: they are derived from path prefixes, so there is nothing to create and nothing empty to clean up.
memory_delete
Soft deletes. The row keeps its content for 30 days, then a scheduled job removes it. The call is idempotent and returns { deleted }.
memory_ingest
Arguments: files (up to 100, 2 MB total), optional path_prefix (default import). Each file becomes a memory at <prefix>/<path>. A file whose name cannot be a path is listed in skipped instead of failing the batch.
project_list
Returns the projects the caller owns or has been granted, with slug, name, role and memoryCount.