Skip to main content
Glama

nmem_recall

Query past context, decisions, or knowledge via spreading activation. Adjust depth for instant lookup or deep graph traversal, and filter by tags, tier, or time.

Instructions

Query memories via spreading activation. Use when you need past context, decisions, or knowledge. Depth: 0=instant lookup, 1=context (default), 2=cross-time patterns, 3=deep graph. Add tags for precision. Use nmem_context instead for broad recent context.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoRecall mode: 'associative' (default) returns formatted context, 'exact' returns raw neuron contents verbatim without truncation or summarization.
tagsNoFilter by tags. Checks tags, auto_tags, and agent_tags columns.
tierNoFilter results by memory tier. Only return memories matching this tier.
as_ofNoISO datetime for time-travel recall. Returns only memories that existed at that point in time (created_at <= as_of) and reconstructs their maturation stage. Example: '2026-03-01T00:00:00' recalls memory state as of March 1st.
depthNoSearch depth: 0=instant (direct lookup, 1 hop), 1=context (spreading activation, 3 hops), 2=habit (cross-time patterns, 4 hops), 3=deep (full graph traversal). Auto-detected if unset.
layerNoLayer scope: 'auto' (default) merges project + global brains, 'project' restricts to current brain only, 'global' queries only the global brain.
queryYesThe query to search memories
brainsNoOptional list of brain names to query across (max 5). When provided, runs parallel recall across all specified brains and merges results.
domainNoDomain scope filter. When set, HOT context injection only includes boundaries tagged with this domain (plus unscoped global boundaries). Example: domain='financial' filters out security boundaries from context.
compactNoCompact mode: return only core answer + confidence, skip all optional metadata (thought_chains, sources, cognitive_chunks, etc). Saves 200-800 tokens. Default: true. Set false for full metadata.
valenceNoFilter: only return memories with this emotional valence. Valence is detected at encoding via sentiment analysis. Use to find e.g. only frustrations (negative) or breakthroughs (positive).
tag_modeNoTag matching mode: 'and' (default, all tags must match) or 'or' (any tag matches).
valid_atNoISO datetime string to filter memories valid at that point in time (e.g. '2026-02-01T12:00:00')
min_trustNoFilter: only return memories with trust_score >= this value. Unscored memories (NULL) are always included.
max_tokensNoMaximum tokens in response (default: 500)
min_arousalNoFilter: only return memories with arousal (emotional intensity) >= this value. Arousal is detected at encoding time (0.0=neutral, 1.0=maximum intensity). Use to find emotionally significant memories (e.g. incidents, breakthroughs).
token_budgetNoMax tokens for response. Progressively strips content to fit budget.
include_pathsNoInclude activation paths (thought chains) showing how each neuron was reached. Returns top-5 paths with neuron content and hop distance. Default: false.
prefer_recentNoRe-rank matched fibers newest-first (by time_end, fallback created_at). Use for queries about current state ('what's the current version', 'today's status'). Do NOT use for historical questions ('how did we design X') — recency bias will mislead. Default: false.
include_statusNoLifecycle status filter. Default surfaces only 'active' neurons. Pass ['active', 'superseded'] to also see auto-superseded memories (Reflex Arc winners), or ['expired'] for past-validity-window history queries.
min_confidenceNoMinimum confidence threshold
permanent_onlyNoExclude ephemeral (session-scoped) memories from results. Default: false (include all).
show_provenanceNoAppend a one-line provenance footer (`[src=… · YYYY-MM-DD · conf=…]`) to each related neuron in recall output. Default: true. Set false to save ~5-8% tokens when caller does not need attribution.
clean_for_promptNoReturn clean bullet-point text without section headers or neuron-type tags. Default: true.
exclude_reflexesNoExclude reflex (always-on) neurons from this recall. Default: false.
warn_expiry_daysNoIf set, warn about memories expiring within this many days. Adds expiry_warnings to response.
include_citationsNoInclude citation and audit trail in exact recall results (default: true).
include_conflictsNoInclude full conflict details in response (default: false). When false, only has_conflicts flag and conflict_count are returned.
simhash_thresholdNoSimHash pre-filter Hamming distance cutoff. Neurons with content_hash farther than this threshold from the query hash are excluded before spreading activation. 0 = disabled (default). Lower values = stricter filtering. Overrides brain config for this query.
recall_token_budgetNoWhen set, activates budget-aware fiber selection: ranks fibers by value-per-token and selects the most efficient ones to fit within this budget. Adds budget_stats to the response. Default: not set (uses standard sequential truncation).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.62.0

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full behavioral burden. It discloses the retrieval mechanism (spreading activation) and the depth ladder, but says nothing about cost (token budgets, compact default), the read-only nature, or what the response looks like. The depth explanation largely duplicates the schema rather than adding behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Five short, front-loaded sentences with the core purpose first and the sibling redirect last; nothing is padded. The depth enumeration is the only segment that restates structured data rather than adding new information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 30-parameter tool with no output schema and no annotations, the description is thin: it never mentions the rich filter surface (tier, as_of, valence, trust/arousal thresholds) or the shape of what comes back, even though the absent output schema means the description could reasonably carry some of that. The schema's 100% coverage keeps this from being inadequate, but it is only minimally sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all 30 parameters are already documented in the schema, and the description's depth ladder repeats what the schema's depth property already says. It adds no syntax, defaults, or interactions beyond the structured fields, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Query memories') and the mechanism ('spreading activation'), then explicitly distinguishes itself from the sibling nmem_context for broad recent context. An agent can pick this tool over its 9 siblings without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit trigger ('when you need past context, decisions, or knowledge'), a refinement hint ('Add tags for precision'), and names the alternative tool with the condition that selects it ('Use nmem_context instead for broad recent context'). This is when-to-use plus when-to-use-something-else.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.