Skip to content
Docs menu

Tool reference · Save & recall

memory_answer

Writes an answer to a question using only records from one project, cites the exact quotes it relied on, and checks the answer with a second LLM pass.

local stdio server writes
Caution. Requires a configured reasoning LLM provider and an explicit project. One call can make up to eight LLM requests.

When to use

  • You need a direct answer with citations, not a list of search hits.
  • Records may disagree over time and you want the latest value, with the replaced value named.
  • You want the tool to say "insufficient" rather than guess when memory does not contain the answer.

Parameters

NameTypeDefaultDescription
queryrequired string — (min length 1)
projectrequired string — (min length 1)
branch string — —
type "all" | "fact" | "decision" | "solution" | "lesson" | "convention" — —
limit integer 10 (min 1, max 20)
max_bytes integer 24000 (min 512, max 24000)
followup boolean true —

Example

Arguments

{
  "query": "What does the nightly billing job use for locking?",
  "project": "my-api",
  "limit": 10
}

Result shape

{
  "answer": "It uses PostgreSQL advisory locks; this replaced the earlier Redis lock.",
  "draft": {
    "status": "supported",
    "answer": "It uses PostgreSQL advisory locks.",
    "claims": [
      {
        "subject": "nightly billing job",
        "event": "uses PostgreSQL advisory locks",
        "time": "2026-09-20",
        "modality": "asserted",
        "citations": [
          {
            "source_id": 1842,
            "quote": "Use PostgreSQL advisory locks",
            "start": 0,
            "end": 29
          }
        ]
      }
    ],
    "missing": null,
    "rejection": null
  },
  "verification": {
    "supported": true,
    "reason": "The cited record states the current lock mechanism."
  },
  "search_calls": 2,
  "followup_query": null,
  "evidence": [
    {
      "id": 1842,
      "type": "decision",
      "project": "my-api",
      "content": "Use PostgreSQL advisory locks…",
      "created_at": "2026-09-20T10:14:03Z"
    }
  ],
  "negative": null,
  "caveat": null
}

Citation start/end offsets refer to the content of the returned evidence items.

Values are illustrative; the keys follow the server's handler. MCP clients receive the result as JSON text content.

Server description

The description the server sends to your agent in tools/list, captured from the v14.7.0 source:

Generate and verify a cited answer using the configured reasoning LLM. Evidence carries recording dates; when records about the same subject disagree, the latest one gives the current value and the answer names the value it replaced. First runs negative retrieval: a contradiction-seeking second search; a score >= 0.60 hands both sides to the reader and answers with a caveat (MEMORY_CONTRADICTION_POLICY=abstain refuses instead), 0.30-0.60 answers with a caveat (see `negative`); MEMORY_CONTRADICTION_SCORER=jev scores the pairs with TypeSafe's Jev instead of the LLM. Up to one missing-relation retrieval and eight LLM calls including inversion retry and bounded quote repair. Explicit project required. Citation offsets refer to returned evidence content. Ordinary recall remains local.

Found a mistake? Open an issue on GitHub.

Search