archive_memories
Archive Memories ·writes · destructive · idempotent · closed-world
Bulk-archive memories (sets status=‘archived’; removed from default search_memories results).
Pass include_archived=True or status=‘archived’ to search_memories to see them again.
Returns: str
Source: backend/src/engram/mcp/tools/memory/lifecycle.py
Parameters
List of memory IDs to archive
batch_reclassify
Batch Reclassify (deprecated) ·writes · non-destructive · idempotent · closed-world
Deprecated alias for batch_reclassify_memories — bulk memory_type update.
Forwards to batch_reclassify_memories without modification. This alias is
kept for backward compatibility with managed-agents allowlists and
external clients that pinned the legacy name; it will be removed in a
future release. New callers should use batch_reclassify_memories.
Returns: str
Source: backend/src/engram/mcp/tools/memory/lifecycle.py
Parameters
List of memory IDs to reclassify
The new memory type (decision, commitment, blocker, preference, pattern, note). Legacy alias: context
batch_reclassify_memories
Batch Reclassify Memories ·writes · non-destructive · idempotent · closed-world
Bulk-change memory_type for many memories in one call. Content is not modified.
For a single memory use reclassify_memory.
Returns: str
Source: backend/src/engram/mcp/tools/memory/lifecycle.py
Parameters
List of memory IDs to reclassify
The new memory type (decision, commitment, blocker, preference, pattern, note). Legacy alias: context
configure_scope
Configure Scope ·writes · non-destructive · idempotent · closed-world
Bind a project name to a scope (‘work’ or ‘personal’) with optional aliases. Future memories
auto-inherit this scope when tagged with the project or an alias.
User-configured mappings take precedence over the default scope config.
Aliases are alternative project names that resolve to this project.
For example, aliases=[“dev”, “engineering”] with project=“consulting”
means memories tagged with project “dev” or “engineering” inherit the
scope configured for “consulting”.
Returns: str
Source: backend/src/engram/mcp/tools/memory/lifecycle.py
Parameters
Project name (case-insensitive, will be lowercased)
Life context scope — ‘work’ or ‘personal’
Optional list of alias names that should resolve to this project
reapply_scope_mappings
Reapply Scope Mappings ·writes · non-destructive · idempotent · closed-world
Re-apply the current scope→project mapping to existing memories whose scope is stale.
Useful after adding or changing scope mappings via configure_scope.
Returns: str
Source: backend/src/engram/mcp/tools/memory/lifecycle.py
This tool takes no parameters.
reclassify_memory
Reclassify Memory ·writes · non-destructive · idempotent · closed-world
Change a single memory’s memory_type (e.g., note → decision). Does not modify content.
For many at once use batch_reclassify_memories.
Returns: str
Source: backend/src/engram/mcp/tools/memory/lifecycle.py
Parameters
The ID of the memory to reclassify
The new memory type (decision, commitment, blocker, preference, pattern, note). Legacy alias: context
remember
Remember ·writes · non-destructive · non-idempotent · closed-world
Persist a new memory (decision, commitment, blocker, preference, pattern, or note)
for retrieval across future sessions. Writes a fresh memory — to search existing memories
use search_memories; to change an existing memory’s type use reclassify_memory.
Returns: str
Source: backend/src/engram/mcp/tools/memory/remember.py
Parameters
Short topic label (e.g., ‘Engram architecture’, ‘User preference’)
The memory content to persist
Optional tags for categorization
One of: decision, commitment, blocker, preference, pattern, note. Legacy alias: context
Optional project name to associate with this memory
Optional urgency level
Optional ISO 8601 expiration timestamp (e.g., ‘2026-03-01T00:00:00Z’)
Optional due date for commitments (ISO 8601 date, e.g., ‘2026-03-01’)
Optional life context (‘personal’ or ‘work’). Auto-derived from project if omitted.
Memory origin. Defaults to ‘mcp’ since this tool is called by AI agents (Claude, Cursor, etc.) via the MCP protocol. Other values: ‘manual’ (user typed it into the dashboard), ‘hook’ (PostToolUse auto-capture), ‘integration’ (third-party sync), ‘onboarding’ (setup flow). Reserved: ‘auto’ (system only).
Initial status: ‘open’ (default), ‘waiting’, or ‘scheduled’. Use ‘waiting’ for commitments blocked on external input, ‘scheduled’ for intentionally deferred work.
Optional JSON for recurring commitments. Keys: frequency, interval, end_date
Consolidation intent. One of: ‘auto’ (default, current behaviour), ‘merge’ (force merge when above similarity threshold), ‘cluster’ (skip merge; link via cluster_members instead when similar in-recency match exists), ‘new’ (skip both merge and cluster, always create a fresh memory). Hash-dedup within the 60-second window still applies to every mode.
Mark this memory as a standing reference that should be retrieved as one unit rather than treated as chunkable source material.
Optional content_chunks.id when this memory is a curated promotion of an indexed chunk. Implies atomic=True.
Required for fact writes unless entity_name is provided.
Required for fact writes unless entity_id is provided.
Fact attribute for explicit fact writes.
Fact value for explicit fact writes.
Optional fact validity start for explicit fact writes.
Optional fact validity end for explicit fact writes.
Mark a fact as immutable so it cannot be superseded automatically.
search_memories
Search Memories ·read-only · non-destructive · idempotent · closed-world
Semantic search over stored memories (commitments, decisions, preferences, blockers,
patterns, notes) — not indexed documents. Use search_content for documents.
Response shape: the raw function returns formatted markdown for human
consumption; when invoked via MCP, the transport layer attaches a
structuredContent payload matching SearchMemoriesResponse
({results, cluster_siblings, total, resolved_sort, query, embedding_model}) so agent hosts can parse results deterministically.
Each hit carries both raw similarity (float in [0,1]) and a
corpus-relative relevance label ("high" / "medium" /
"low"). Prefer branching on relevance — raw cosine values
are not portable across environments (prod and staging corpora
differ). high means “top of this query’s distribution”, low
means “tail noise for this query”.
Returns: str
Source: backend/src/engram/mcp/tools/memory/recall.py
Parameters
What you’re looking for (natural language)
Max memories to return (default 5)
Filter by type (decision, commitment, blocker, preference, pattern, note). Legacy alias: context
Filter by project name
Filter by status (open, waiting, scheduled, resolved, expired, overdue, archived). Default returns all active (open + waiting + scheduled).
ISO 8601 timestamp — only return memories created on or after this date
ISO 8601 date — only return memories with due_date on or before this date
Optional life context filter (‘personal’ or ‘work’)
Filter by memory origin (‘manual’, ‘hook’, ‘auto’)
Filter by tag (exact match, e.g. ‘deploy’ returns memories tagged with ‘deploy’)
If True, return compact one-line-per-memory format for scanning
sort_by
Literal['auto', 'relevance', 'similarity', 'recency', 'recent', 'hybrid', 'updated']
default:"'auto'"
Sort order. Finite set:
- ‘relevance’ (alias ‘similarity’) — pure cosine similarity ranking with recall boost + temporal decay. Best default for topical queries.
- ‘recency’ (alias ‘recent’) — newest first. Filters by similarity_floor then sorts by created_at DESC, so “recent matches” means exactly that (not “globally newest with weak relevance bias”).
- ‘hybrid’ — 0.7cosine + 0.3BM25 keyword blend. Use when topic contains specific proper nouns that embeddings alone miss.
- ‘updated’ — legacy; ORDER BY updated_at DESC.
- ‘auto’ (default) — detect temporal keywords in topic (today, recent, last week, …) and route to ‘recency’; otherwise ‘relevance’.
If True, include archived memories in results (default False)
If True, return only memories marked atomic (standing references such as protocols, playbooks, and routines).
Cluster-sibling expansion policy.
- ‘auto’ (default) — expand only when fewer than 3 primary results survive the similarity_floor. Prevents sibling flood on dense queries while still helping sparse ones.
- ‘always’ — always append cluster siblings of top matches.
- ‘never’ — skip sibling expansion entirely. Expanded rows are marked
via_cluster: truefor the caller.
Drop results whose similarity is below this threshold, applied before ordering. Range [0.0, 1.0], default 0.3. Zero disables the filter. Returning an empty set here is meaningful: it signals “no relevant matches” (vs. silently cluster-expanding).
If True, include retrieval metadata (similarity scores, index used, re-ranking details, embedding stats) for each result