Skip to main content

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

ParameterTypeRequiredDescription
contentstringYesClear, complete, searchable statement. Full sentences work best - not fragments or keywords.
categorystringNoOne of preference, fact, decision, or context. See below.
projectstringNoProject grouping for known project/app context. Examples: memcontext, carq. Omit if unsure. Format: lowercase, no spaces.

Categories

CategoryUse forExample
preferenceUser likes/dislikes”User prefers dark mode”
factObjective information”User uses macOS”
decisionChoices made”Chose PostgreSQL for database”
contextBackground information”Working on e-commerce app”

What happens on save

For normal-size memories:
  1. Content is expanded into a more searchable form via LLM
  2. An embedding is generated
  3. Similar existing memories are found
  4. The relationship is classified (update, extend, similar, or duplicate)
  5. The memory is saved, supersedes an existing one, extends one, or is deduplicated
For larger notes:
  1. The request is accepted quickly
  2. The note is prepared for asynchronous extraction
  3. MemContext extracts atomic memories from the note
  4. 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:
StatusMeaning
savedNew memory created
updatedSuperseded an existing memory (old one marked non-current)
extendedCreated a relation to an existing memory
duplicateContent already exists, nothing saved
acceptedLarge 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)