get_memory
Direct retrieval by ID — no search, no scoring. Returns the complete memory record including the bidirectional related memory graph built at store time.
Parameters #
| Parameter | Type | Required | Description |
|---|---|---|---|
memory_id | number | Yes | The ID of the memory to retrieve |
Response #
Beyond content, labels, and source, get_memory returns:
| Field | Description |
|---|---|
related_memories | Memories with similar content, pre-computed at store time — each with id, similarity, and source |
meta.timestamp | Exact storage timestamp |
meta.embedding_tables | Which embedding model was used |
time | Human-readable age (“10 minutes ago”, “4 days ago”) |
The Related Memory Graph #
When a memory is stored, Memory MCP automatically computes similarity against existing memories and builds a bidirectional map of related entries. If memory #1008 is related to #478, both records carry that link — no orphaned references.
The graph self-maintains:
- On store — new relationships computed and linked
- On delete — back-references cleaned up automatically
This means get_memory gives you not just the memory you asked for, but a map of where it sits in the broader knowledge graph.
Examples #
# Retrieve a specific memory
get_memory(memory_id: 42)
# Follow a reference surfaced by retrieve_memories
retrieve_memories(query: "authentication decision")
→ Memory #42 returned with related_memories: [{id: 38}, {id: 51}]
→ get_memory(memory_id: 38)
→ get_memory(memory_id: 51)
Power Combinations #
Breadcrumb traversal — follow the related memory graph without semantic search. Zero embedding cost, pure graph navigation:
get_memory(memory_id: 478)
→ related_memories: [{id: 312, similarity: "83%"}, {id: 156, similarity: "75%"}]
→ get_memory(memory_id: 312) # follow the strongest link
→ get_memory(memory_id: 156) # explore the second branch
Useful when you know roughly where you are in the knowledge graph and want to explore the neighbourhood — past decisions, related discussions, follow-up exchanges — without constructing a query.
Context reconstruction — when an agent surfaces a memory ID (from recalled-memories, a previous response, or a note), get_memory retrieves the full record including surrounding context via related_memories. One ID becomes a web.