Skip to content

Reference

MCP tool reference

Every memory_* tool exposed by quaid serve, with parameters, returns, and JSON-RPC examples.

quaid serve exposes a stdio MCP server that speaks JSON-RPC 2.0. Twenty-six memory_* tools cover the read, write, graph, intelligence, conversation memory, and namespace surfaces. This page is the canonical catalog.

Version note. The stdio surface grew to 26 tools (adding memory_gap_resolve and memory_rehydrate); graph path output, HTTP/SSE transport, and quaid daemon lifecycle commands are all available in the current published release (v0.23.0). Main currently carries the same 0.23.0 manifest, so there is no separate branch-only MCP surface documented here.

The default transport is stdio. Any MCP-compatible client (Claude Code, Cursor, custom rmcp clients) can connect by spawning quaid serve and exchanging JSON-RPC over stdin/stdout. An opt-in HTTP/SSE transport is also available via quaid serve --http or quaid daemon run --http in v0.23.0. See Connect Claude Code for a worked example.

Platform note. quaid serve and all MCP tools are cross-platform. Live vault-sync watcher threads (automatic reconcile on file edits) start only on Unix (macOS / Linux) and are simply not started on Windows — MCP tool calls continue to work normally on all platforms.

  • Slugs may be collection-qualified (<collection>::<slug>). Bare slugs resolve to the default collection or fail with Ambiguity if multiple collections expose the same slug.
  • All timestamps are ISO-8601 strings. valid_from / valid_until may be null to indicate open-start or open-end intervals.
  • Error responses use extended JSON-RPC codes documented in Errors.
  • The MCP server enforces collection write-gates: a restoring or needs_full_sync collection rejects mutations with CollectionRestoringError before any other validation runs.
ToolPurposeMutates
memory_getRead a page
memory_putCreate or update a page (OCC)
memory_queryHybrid semantic + FTS5 query
memory_searchFTS5 keyword search
memory_listList pages with filters
memory_rehydrateReverse outbound redaction tokens (session)
memory_linkCreate a temporal link
memory_link_closeClose a temporal link interval
memory_backlinksList inbound links
memory_graphN-hop graph neighbourhood
memory_checkContradiction detection
memory_timelineTimeline entries for a page
memory_tagsList, add, or remove tags
memory_gapLog a knowledge gap (privacy-safe)
memory_gapsList knowledge gaps
memory_gap_resolveResolve a gap by its answering page
memory_statsMemory statistics
memory_collectionsList collection status
memory_rawStore raw structured data
memory_add_turnAppend a turn to a conversation session
memory_close_sessionClose a conversation session for extraction
memory_close_actionMark an action-item page done or cancelled
memory_correctStart a guided fact-correction dialogue
memory_correct_continueAdvance or abandon an open correction dialogue
memory_namespace_createCreate an isolated namespace
memory_namespace_destroyDestroy a namespace and its contents

Get a page by slug.

ParamTypeRequiredNotes
slugstringyesBare or collection-qualified

Returns the rendered markdown of the page (compiled truth + timeline).

{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{
"name":"memory_get","arguments":{"slug":"people/alice"}
}}

Errors: NotFound, Ambiguity.

FTS5 full-text search.

ParamTypeRequiredDefault
querystringyes
collectionstringno
namespacestringno
wingstringno
limitu32no10
include_supersededbooleannofalse

Returns a JSON array of {slug, title, snippet, score}.

Hybrid semantic + FTS5 query.

ParamTypeRequiredDefault
querystringyes
collectionstringno
namespacestringno
wingstringno
limitu32no10
depthstringno– (set to "auto" for progressive expansion)
include_supersededbooleannofalse

Returns a ranked, fused result list with optional progressive context up to the active token budget.

List pages with optional filters.

ParamTypeRequiredDefault
collectionstringno
namespacestringno
wingstringno
page_typestringno
limitu32no50

Reverse this session’s outbound redaction tokens back to their originals.

ParamTypeRequiredNotes
textstringyesText containing tokens like <EMAIL_1> to restore

Reversal uses the redaction map built for this connection by earlier redact: true reads. The substitution happens locally; originals never leave the machine until the agent acts on the rehydrated text. Unknown tokens pass through untouched.

Write or update a page.

ParamTypeRequiredNotes
slugstringyes
contentstringyesFull page markdown (frontmatter + body)
expected_versioni64no (required for safe updates)OCC: must match current version
namespacestringnoWrite into a named namespace; omit for global memory

Errors: Conflict on OCC violation; CollectionReadOnlyError if the target collection is not writable; CollectionRestoringError while a collection is mid-restore.

{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{
"name":"memory_put",
"arguments":{
"slug":"people/alice",
"content":"---\ntitle: Alice\ntype: person\n---\n# Alice\n\n",
"expected_version": 7
}
}}

Store raw structured data (API responses, JSON) for a page.

ParamTypeRequiredDefault
slugstringyes
sourcestringyesE.g. "crustdata", "exa", "meeting"
dataobjectyesMust be a JSON object (not array/scalar)
overwritebooleannofalse

Per (slug, source) only one row is kept active; older rows roll over per the configured retention.

Create a typed temporal link between two pages.

ParamTypeRequired
from_slugstringyes
to_slugstringyes
relationshipstringyes
valid_fromISO-8601no
valid_untilISO-8601no

Close a temporal link by its database ID.

ParamTypeRequired
link_idu64yes
valid_untilISO-8601yes

List inbound backlinks for a page.

ParamTypeRequiredDefault
slugstringyes
limitu32no
temporalstringno"current" (alt: "all")

N-hop neighbourhood graph from a page, with path explanations.

ParamTypeRequiredDefault
slugstringyes
depthu32no2
temporalstringno"current"

The response carries the usual nodes and edges arrays plus a paths object keyed by reachable slug. Each value is a list of (from_slug, relationship, to_slug) triples describing the first path found to that node during BFS; the value for the root slug is an empty list. This shape shipped in v0.22.0 and remains part of the current published release (v0.23.0). There is no compatibility mode.

Run contradiction detection on a page or all pages.

ParamTypeRequired
slugstringno (omit to scan globally)

Show timeline entries for a page.

ParamTypeRequiredDefault
slugstringyes
limitu32no20

List, add, or remove tags on a page.

ParamTypeRequired
slugstringyes
addstring[]no
removestring[]no

Log a knowledge gap (privacy-safe: stores query_hash, not raw query).

ParamTypeRequired
querystringyes
slugstringno
contextstringno

The raw query is not persisted unless explicitly approved via the knowledge_gaps approval workflow. See Sensitivity contract.

List knowledge gaps.

ParamTypeRequiredDefault
resolvedbooleannofalse
limitu32no20 (max 1000)

Mark a logged gap resolved by the page that answered it.

ParamTypeRequired
idi64yes
slugstringyes

Flips the gap’s resolved_at / resolved_by_slug; the slug must resolve to an existing page. Resolved gaps drop out of the default memory_gaps queue.

Memory statistics.

No parameters. Returns counts (pages, links, embeddings, gaps), the active embedding model, and schema version.

List collection status for MCP clients.

No parameters. Returns one entry per attached collection with state, ignore-pattern diagnostics, and recovery flags.

These tools store and process conversation turns. Turns are batched under a session_id; closing a session queues the conversation for knowledge extraction into pages. Turn content may contain ordinary Markdown horizontal rules (---); Quaid uses an internal turn boundary marker so content delimiters are not confused with stored turn separators.

Append a turn to a conversation session.

ParamTypeRequiredDefault
session_idstringyes
rolestringyes"user", "assistant", or "system"
contentstringyes
timestampISO-8601noserver time
metadataobjectno
namespacestringno
{"jsonrpc":"2.0","id":10,"method":"tools/call","params":{
"name":"memory_add_turn",
"arguments":{
"session_id":"sess-abc123",
"role":"user",
"content":"What did we decide about the API rate limits?"
}
}}

Close a session and queue it for knowledge extraction.

ParamTypeRequired
session_idstringyes
namespacestringno

Returns the queue position for the extraction job. Calling memory_close_session again on the same session reports the current queue position without re-enqueuing.

Mark an action_item page as done or cancelled.

ParamTypeRequiredNotes
slugstringyesMust be an action_item page
statusstringyes"done" or "cancelled"
notestringnoAppended to the page’s truth body

Errors: KindError if the page is not an action_item; Conflict on OCC violation.

Start a guided fact-correction dialogue on a page.

ParamTypeRequired
fact_slugstringyes
correctionstringyes

Returns a correction_id and a prompt asking the agent to confirm or refine the proposed change. Advance or abandon the dialogue with memory_correct_continue.

Advance or abandon an open correction dialogue.

ParamTypeRequired
correction_idstringyes
responsestringno
abandonbooleanno

Set abandon: true to discard the dialogue without writing changes.

Namespaces provide isolated scopes within the same database — useful for per-project or per-client memory partitions. Pages written with a namespace are invisible to queries that don’t specify that namespace.

Create a namespace.

ParamTypeRequiredDefault
idstringyes
ttl_hoursfloatno– (no expiry)

When ttl_hours is set, the namespace and all its pages are automatically destroyed after the TTL elapses.

{"jsonrpc":"2.0","id":20,"method":"tools/call","params":{
"name":"memory_namespace_create",
"arguments":{"id":"project-alpha","ttl_hours":720}
}}

Destroy a namespace and all pages within it.

ParamTypeRequired
idstringyes

This is irreversible. Pages in the namespace are permanently removed.

Every tool call uses the standard MCP tools/call shape:

{
"jsonrpc": "2.0",
"id": <request_id>,
"method": "tools/call",
"params": {
"name": "<tool_name>",
"arguments": { ... }
}
}

Successful responses contain a result.content array. Errors return an error.code per Errors.