Description
save_memory stores a piece of knowledge that should be remembered across sessions. MemContext automatically handles deduplication, versioning, and relationship classification. Short memories are saved immediately; larger notes may be accepted for asynchronous extraction into multiple atomic memories.
Parameters
| Parameter | Type | Required | Description |
|---|
content | string | Yes | Clear, complete, searchable statement. Full sentences work best - not fragments or keywords. |
category | string | No | One of preference, fact, decision, or context. See below. |
project | string | No | Project grouping for known project/app context. Examples: memcontext, carq. Omit if unsure. Format: lowercase, no spaces. |
Categories
| Category | Use for | Example |
|---|
preference | User likes/dislikes | ”User prefers dark mode” |
fact | Objective information | ”User uses macOS” |
decision | Choices made | ”Chose PostgreSQL for database” |
context | Background information | ”Working on e-commerce app” |
What happens on save
For normal-size memories:
- Content is expanded into a more searchable form via LLM
- An embedding is generated
- Similar existing memories are found
- The relationship is classified (update, extend, similar, or duplicate)
- The memory is saved, supersedes an existing one, extends one, or is deduplicated
For larger notes:
- The request is accepted quickly
- The note is prepared for asynchronous extraction
- MemContext extracts atomic memories from the note
- Each extracted item is saved as its own searchable memory
Timing guidance
MCP memories use automatic TTL. Use the REST API, TypeScript SDK, or dashboard when exact expiry is required.
Response
The response includes a status field indicating what happened:
| Status | Meaning |
|---|
saved | New memory created |
updated | Superseded an existing memory (old one marked non-current) |
extended | Created a relation to an existing memory |
duplicate | Content already exists, nothing saved |
accepted | Large content accepted for asynchronous extraction |
Duplicates are handled automatically - re-saving an already-known fact is safe.
When status is accepted, the response includes a jobId plus a message for tracking extraction.
Example
save_memory({
content: "User prefers TypeScript over JavaScript for type safety",
category: "preference"
})
MCP tools do not accept scope because AI agents can hallucinate isolation
IDs. Use the REST API or TypeScript SDK for app-user or tenant scoped
integrations.
Content guidelines
Content should be written as clear, self-contained statements that will be searchable later:
- Good:
"User prefers TypeScript over JavaScript for type safety"
- Bad:
"TS > JS" (too vague, not searchable)
- Bad:
"user likes coding" (not specific enough to be useful)