Store Memory
store_memoryStore persistent memories individually or in batches, including corrections that supersede outdated entries, so AI assistants retain accurate context across conversations.
Instructions
Store memory in one of two modes — single-memory (set top-level content) or batch (set memories: [...] for up to 500).
Mode 1 — Single (default): pass top-level content plus any optional fields (tags, importance, metadata, type, confidence, embedding, t_valid, t_invalid, etc.).
Mode 1b — Supersede/correct: pass top-level content plus supersedes_memory_id. The server stores the replacement, marks the old memory invalid with t_invalid=now, merges supersede metadata, and associates old → new with INVALIDATED_BY (default) or EVOLVED_INTO.
Mode 2 — Batch: pass memories: [{ content, tags?, importance?, metadata?, timestamp?, type?, confidence? }, ...] to store up to 500 memories in one request. Faster for bulk ingestion (imports, benchmark seeding). Batch mode does NOT accept embedding, t_valid, or t_invalid per-item — use single mode for those.
Content size guidelines (per item):
Target: 150-300 characters (one meaningful paragraph)
Maximum: 500 characters (auto-summarized if exceeded)
Hard limit: 2000 characters (rejected)
Format: "Brief title. Context and details. Impact/outcome."
When to use:
After making a decision: store the reasoning and outcome
When discovering a pattern: store the pattern and where it applies
After fixing a bug: store the root cause and solution
When learning user preferences: store what they prefer and why
For bulk ingestion (imports, seeding): use batch mode
Examples:
store_memory({ content: "Chose PostgreSQL over MongoDB for user service. Need ACID for transactions.", tags: ["architecture", "database"], importance: 0.9 })
store_memory({ content: "User prefers early returns over nested conditionals.", tags: ["code-style"], importance: 0.7 })
store_memory({ content: "User now prefers SQLite for small local tools.", supersedes_memory_id: "8f3a2c1e-5b7d-4e9a-a1c3-2d4f6b8e0a91", supersede_reason: "Correction from user" })
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "store_memory"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tags | No | e.g. ["bugfix", "auth", "<project-slug>"] | |
| type | No | ||
| content | No | Single mode (XOR with `memories`). Include context, reasoning, and outcome. | |
| t_valid | No | ISO 8601 start of validity. Not in batch mode. | |
| memories | No | Batch mode (XOR with `content`). Other top-level fields apply to single mode only; items take no `embedding`, `t_valid` or `t_invalid`. | |
| metadata | No | Structured details, e.g. { files_modified: ["auth.ts"] } | |
| embedding | No | Auto-generated if omitted. Not in batch mode. | |
| t_invalid | No | ISO 8601 expiry. Not in batch mode. | |
| timestamp | No | ISO 8601; defaults to now. | |
| confidence | No | Type confidence; defaults to 0.9 when `type` is set. | |
| importance | No | 0.9+ critical decisions, 0.7-0.9 patterns/bugs, 0.5-0.7 minor notes | |
| updated_at | No | ISO 8601 | |
| last_accessed | No | ISO 8601 | |
| supersede_reason | No | Supersede mode: reason stored on the old memory's metadata. | |
| supersede_relation | No | Supersede mode: relation from old to new. | INVALIDATED_BY |
| supersedes_memory_id | No | Supersede mode: ID of the memory this one replaces or corrects. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| qdrant | No | Batch mode. | |
| stored | No | Batch mode. | |
| message | Yes | ||
| memory_id | No | Single mode: ID of the stored memory. | |
| enrichment | No | Batch mode. | |
| memory_ids | No | Batch mode. | |
| query_time_ms | No | Batch mode. | |
| association_created | No | Supersede mode. | |
| superseded_memory_id | No | Supersede mode: the old memory, now invalid. |