save_memory
Store a fact, decision, or finding for later recall, and flag corrections that replace an existing memory or update an evolving topic so outdated versions stop appearing in search.
Instructions
Saves a memory now: when the user asks to remember something, or when closing a task with a finding worth keeping. Never save a credential — a token, a private key, a password. Save where it lives ("the deploy token is in ~/.config/deploy/env"); a save that looks like a secret is refused.
CORRECTIONS. An UPDATED VERSION of something already saved — a correction, a fact that changed, a revised decision — has to say so, or the old one keeps competing in searches. Two parameters for two cases: supersedes (id) corrects ONE SPECIFIC EXISTING MEMORY you found with search_memory, which stops appearing (it is not deleted); topic (key) is for a subject that will KEEP EVOLVING, and the new save replaces the active one under that key in this project. Use EXACTLY the key shown as [topic: key]; keys are lowercase with collapsed whitespace, and beyond that they are exact. A new key does NOT replace a memory saved without one — use supersedes for that. Both may be sent at once; if they point at different memories nothing is saved and the response says why. Pick a short, stable key naming the SUBJECT and not the content (frontend-stack, payment-provider), and do not reuse one across unrelated facts: the previous version would vanish from searches. The response names what it replaced, with its id.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"text": "<text>"
},
"name": "save_memory"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tags | No | ||
| text | Yes | ||
| topic | No | Topic key, optional. Set it if the subject will keep evolving: it replaces the active memory under the same key in the same project. A short, stable phrase naming the subject, e.g. `branching-policy`. | |
| anchor | No | What the memory was checked against: `<path>` or `<path>:<symbol>`, relative to the project. Recorded with the hash so a later `check_anchor` can say whether the code still matches. | |
| project | No | ||
| verified | No | Optional, false by default. Set it to true ONLY for something you checked against the world in this session: a command you ran and read the output of, a file you opened, a test that passed. Not for what you inferred, what you were told, or what seems right. A memory saved this way comes back marked `[verified]`, and the mark is worth exactly as much as your honesty about it: marking a guess makes the next session trust a guess. What you did not check is still worth saving — save it unmarked, and mark it later with `mem verify <id>` when something confirms it. | |
| supersedes | No | Id of a specific, active memory that this one corrects and replaces, optional. It is the one that will stop appearing in searches. Use it to correct something already saved, with or without a topic key. |