Skip to main content
Glama

Recall Memory

recall_memory
Read-onlyIdempotent

Recall memories from AutoMem in one of three modes. The mode is selected by which params you pass.

Instructions

Recall memories from AutoMem in one of three modes. The mode is selected by which params you pass.

Mode 1 — ID fetch: pass memory_id to retrieve a single memory by ID. All other params are ignored. Routes to GET /memory/{id} and updates last_accessed.

Mode 2 — Tag enumeration: pass tags + exhaustive: true for paginated exact-match listing (NOT ranked retrieval). Use this for cleanup/audit workflows where ranked retrieval silently undercounts large tag sets. Pair with limit (≤200) and offset. Returns has_more/limit/offset page metadata; next page at next_offset. Tag matching is exact, case-insensitive, any-of mode — tag_match: "prefix" and tag_mode: "all" are rejected in this mode.

Mode 3 — Ranked retrieval (default): hybrid search across vector, keyword, tags, recency, and optional graph expansion. The primary tool for finding relevant context. By default, ranked recall requests current active memories only; set current_only: false for audits.

When to use ranked (mode 3):

  • At conversation start: recall context about the current project/topic

  • Before making decisions: check for past decisions on similar topics

  • When debugging: search for similar past errors and their solutions

  • For complex questions: use expand_entities for multi-hop reasoning

When to use enumeration (mode 2): when you need to know how many memories carry a tag, or to walk all of them for cleanup/migration. Ranked recall ignores low-importance hits — enumeration does not.

Examples:

  • recall_memory({ query: "database architecture decisions", tags: ["my-project"], limit: 5 })

  • recall_memory({ memory_id: "8f3a2c1e-5b7d-4e9a-a1c3-2d4f6b8e0a91" }) // Mode 1

  • recall_memory({ tags: ["benchmark-test"], exhaustive: true, limit: 50 }) // Mode 2 (add offset for later pages)

  • recall_memory({ query: "auth", exclude_tags: ["deprecated"] }) // Mode 3 with exclusion

  • recall_memory({ query: "What is Sarah's sister's job?", expand_entities: true }) // Mode 3 multi-hop

Input Schema

NameRequiredDescriptionDefault
endNoISO timestamp upper bound
sortNoResult ordering (use time_* for chronological recaps)
tagsNoFilter by tags. Use project name as first tag for scoping.
limitNoMax memories to return. Schema allows 1–200; in enumeration mode (`exhaustive: true`) the server honors up to 200, while ranked mode is typically clamped server-side to ~50. When omitted, the server defaults to 5 in ranked mode and 20 in enumeration mode.
queryNoSemantic search query (natural language). Describe what you're looking for.
startNoISO timestamp lower bound (alternative to time_query)
formatNoOutput format: text (default), items (one block per memory, in `results` order, then one bracketed trailing block when there are notes or budget cuts), detailed (adds type/confidence/metadata keys/relation stubs), json (raw per-memory fields incl. full content/metadata/relations; whole-response token budget still applies). text/items/detailed show a content preview (default 400 chars) and keep any stored summary as an additive field — fetch a full record via memory_id.text
offsetNoEnumeration mode only (`exhaustive: true`): records to skip, for paging. Ranked recall has no offset and rejects one; raise `limit` instead.
contextNoContext label (e.g., "coding-style", "architecture"). Boosts matching preferences.
queriesNoMultiple queries for broader recall. Results are deduplicated server-side.
languageNoProgramming language hint (e.g., "python", "typescript"). Prioritizes language-specific memories.
tag_modeNo"any" matches memories with any tag (default), "all" requires all tags
embeddingNoOptional embedding vector for direct similarity search
memory_idNoMODE: ID fetch. When set, fetches the single memory by ID and IGNORES all other params. Routes to GET /memory/{id}; updates last_accessed.
min_scoreNoRanked-mode only. Minimum final score threshold before results are returned.
tag_matchNo"prefix" (ranked default) matches tags that start with the value, so `tags: ["automem"]` also matches `automem-evals`; "exact" matches whole tags only. Enumeration mode is always exact.
exhaustiveNoMODE: tag enumeration. When true, requires non-empty `tags`. Routes to GET /memory/by-tag for paginated exact-match listing — NOT ranked retrieval. Use for cleanup/audit workflows where ranked recall undercounts. `limit` is clamped to 200. `tag_match: "prefix"` and `tag_mode: "all"` are rejected in this mode.
state_modeNoRanked-mode only. `current` returns active memories; `history` allows superseded/invalidated memories for audit timelines. Prefer this over current_only for new clients.
time_queryNoNatural language time filter: "today", "yesterday", "last week", "last 30 days"
active_pathNoCurrent file path for language auto-detection (e.g., "src/auth.ts")
state_debugNoRanked-mode only. Include state-filter suppression/replacement IDs and reasons when current_only is true.
context_tagsNoPriority tags to boost in results (e.g., ["coding-style", "preferences"])
current_onlyNoRanked-mode only. When true, server suppresses archived, not-yet-valid, expired, invalidated, or superseded memories from active context.
exclude_tagsNoRanked-mode only. Tags to exclude from results (any match excludes). Independent of `tag_match` — supports both exact and prefix matching internally on the server.
priority_idsNoSpecific memory IDs to ensure are included in results
recency_biasNoRanked-mode only. Controls service recency boosting: auto lets the service infer, on forces boosting, off disables it.
context_typesNoPriority memory types to boost (e.g., ["Style", "Preference"])
adaptive_floorNoRanked-mode only. Enable the service's adaptive score floor when filtering weak matches.
auto_decomposeNoAuto-extract entities and topics from query to generate supplementary searches.
relation_limitNoMax relations to follow per seed memory (default: 5)
scope_fallbackNoRanked-mode only. Allow fallback outside the requested tag scope when scoped recall has weak evidence; diagnostics report tag_scope and outside_tag_scope.
expand_entitiesNoEnable multi-hop reasoning via entity expansion. Finds memories about people/places mentioned in seed results. Use for "What is X's sister's job?" type questions.
expansion_limitNoMax total expanded memories (default: 25)
per_query_limitNoPer-query result limit when using queries[] (default: 5)
expand_relationsNoFollow graph relationships from seed results to find related memories.
expand_min_strengthNoMinimum relation strength to follow during graph expansion. Only traverses edges above this threshold. Recommended: 0.3 for exploratory, 0.6+ for high-confidence connections only. Does not affect entity expansion.
expand_respect_tagsNoRanked-mode only. When true, graph/entity expansion stays within the original tag scope; when false, expansion may include related context outside the tags.
expand_min_importanceNoMinimum importance score for expanded results. Filters out low-relevance memories during graph/entity expansion. Recommended: 0.3-0.5 for broad context, 0.6-0.8 for focused results. Seed results are never filtered, only expanded ones.

Output Schema

NameRequiredDescriptionDefault
modeNoMode that produced the result.
sortNoSort mode applied by the service.
countYesNumber of memories returned
limitNoEnumeration mode only: page size of this response. When the response budget trims a page, `count` and `limit` shrink to the results returned, so `offset + limit` still starts the next page.
queryNoQuery text executed by ranked recall.
offsetNoEnumeration mode only: offset used for this response.
queriesNoQuery variants executed by the service.
resultsYesArray of matching memories with scores
entitiesNoEntity identity diagnostics injected by the service.
has_moreNoEnumeration mode only: true if more records exist past this page. Continue at `next_offset`.
tag_scopeNoTag-scope diagnostics including whether scoped evidence was strong enough.
state_modeNoState mode applied by ranked recall.
truncationNoPresent when the response budget cut anything: { applied, omitted_results, reason }, plus `omitted_fields` (diagnostics dropped because they did not fit even without results) and `compacted_results` (a json result shown in compact form because it did not fit whole).
next_offsetNoEnumeration mode only, when `has_more` is true: the `offset` for the next page (this offset plus the results returned).
exclude_tagsNoTags excluded from ranked recall.
recency_biasNoRecency bias mode applied by the service.
score_filterNoScore filtering diagnostics such as min_score, adaptive_floor, and filtered_count.
state_filterNoCurrent-state filtering diagnostics. Includes aggregate counts by default and detailed IDs/reasons only when state_debug=true.
dedup_removedNoNumber of duplicate results removed (when using multiple queries)
query_time_msNoService recall latency in milliseconds.
vector_searchNoVector-search diagnostics from the service.
scope_fallbackNoTrue when recall allowed outside-scope fallback results.
jit_enriched_countNoNumber of memories enriched inline during recall.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changedv0.14.3
    • changedInput schema / properties / format / description
      Previous value: -"Output format: text (default), items (one block per memory), detailed (adds type/confidence/metadata keys/relation stubs), json (raw per-memory fields incl. full content/metadata/relations; whole-response token budget still applies). text/items/detailed show a content preview (default 400 chars) and keep any stored summary as an additive field — fetch a full record via memory_id."New value: +"Output format: text (default), items (one block per memory, in `results` order, then one bracketed trailing block when there are notes or budget cuts), detailed (adds type/confidence/metadata keys/relation stubs), json (raw per-memory fields incl. full content/metadata/relations; whole-response token budget still applies). text/items/detailed show a content preview (default 400 chars) and keep any stored summary as an additive field — fetch a full record via memory_id."
    • removedInput schema / properties / limit / default
      Removed value: -5
    • changedInput schema / properties / limit / description
      Previous value: -"Max memories to return. Schema allows 1–200; in enumeration mode (`exhaustive: true`) the server honors up to 200, while ranked mode is typically clamped server-side to ~50. Default 5."New value: +"Max memories to return. Schema allows 1–200; in enumeration mode (`exhaustive: true`) the server honors up to 200, while ranked mode is typically clamped server-side to ~50. When omitted, the server defaults to 5 in ranked mode and 20 in enumeration mode."
    • changedInput schema / properties / offset / description
      Previous value: -"Result offset for pagination"New value: +"Enumeration mode only (`exhaustive: true`): records to skip, for paging. Ranked recall has no offset and rejects one; raise `limit` instead."
    • changedInput schema / properties / tag_match / description
      Previous value: -"\"exact\" for exact tag match (default), \"prefix\" for starts-with matching"New value: +"\"prefix\" (ranked default) matches tags that start with the value, so `tags: [\"automem\"]` also matches `automem-evals`; \"exact\" matches whole tags only. Enumeration mode is always exact."
    • changedOutput schema / properties / has_more / description
      Previous value: -"Enumeration mode only: true if more pages exist past `offset + limit`."New value: +"Enumeration mode only: true if more records exist past this page. Continue at `next_offset`."
    • changedOutput schema / properties / limit / description
      Previous value: -"Enumeration mode only: page size used for this response."New value: +"Enumeration mode only: page size of this response. When the response budget trims a page, `count` and `limit` shrink to the results returned, so `offset + limit` still starts the next page."
    • addedOutput schema / properties / next_offset
      Added value: +{
      +  "description": "Enumeration mode only, when `has_more` is true: the `offset` for the next page (this offset plus the results returned).",
      +  "type": "integer"
      +}
    • addedOutput schema / properties / results / items / properties / archived
      Added value: +{
      +  "description": "json and ID fetch only: true when the memory is archived.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / results / items / properties / t_invalid
      Added value: +{
      +  "description": "json and ID fetch only: when the memory stopped being valid (set when superseded). Absent while current.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / results / items / properties / t_valid
      Added value: +{
      +  "description": "json and ID fetch only: when the memory became valid.",
      +  "type": "string"
      +}
    • changedOutput schema / properties / truncation / description
      Previous value: -"Present when trailing results were dropped to fit the response budget: { applied, omitted_results, reason }."New value: +"Present when the response budget cut anything: { applied, omitted_results, reason }, plus `omitted_fields` (diagnostics dropped because they did not fit even without results) and `compacted_results` (a json result shown in compact form because it did not fit whole)."
  2. Changed4 schema fields changedv0.14.2
    • changedInput schema / properties / format / description
      Previous value: -"Output format: text (default), items (one block per memory), detailed (adds type/confidence/metadata keys/relation stubs), json (raw per-memory fields incl. full content/metadata/relations; whole-response token budget still applies). text/items/detailed are summary-first: each memory shows its stored 1-2 sentence summary when available, else a content preview — fetch a full record via memory_id."New value: +"Output format: text (default), items (one block per memory), detailed (adds type/confidence/metadata keys/relation stubs), json (raw per-memory fields incl. full content/metadata/relations; whole-response token budget still applies). text/items/detailed show a content preview (default 400 chars) and keep any stored summary as an additive field — fetch a full record via memory_id."
    • changedOutput schema / properties / results / items / properties / content / description
      Previous value: -"Memory content (preview in budgeted formats; omitted when summary is shown)."New value: +"Memory content (preview-capped in budgeted formats)."
    • changedOutput schema / properties / results / items / properties / content_chars / description
      Previous value: -"Original content length when content was previewed or replaced by summary."New value: +"Original content length when content was previewed."
    • changedOutput schema / properties / results / items / properties / summary / description
      Previous value: -"Stored 1-2 sentence summary. In budgeted formats it replaces content when present."New value: +"Stored 1-2 sentence summary when the server provides one. Additive in budgeted formats; does not replace content."
  3. Changed33 schema fields changedv0.14.1
    • addedInput schema / properties / adaptive_floor
      Added value: +{
      +  "description": "Ranked-mode only. Enable the service's adaptive score floor when filtering weak matches.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / current_only
      Added value: +{
      +  "default": true,
      +  "description": "Ranked-mode only. When true, server suppresses archived, not-yet-valid, expired, invalidated, or superseded memories from active context.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / expand_respect_tags
      Added value: +{
      +  "description": "Ranked-mode only. When true, graph/entity expansion stays within the original tag scope; when false, expansion may include related context outside the tags.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / format / description
      Previous value: -"Output format: text (default), items (per-memory), detailed (with metadata), json (raw)"New value: +"Output format: text (default), items (one block per memory), detailed (adds type/confidence/metadata keys/relation stubs), json (raw per-memory fields incl. full content/metadata/relations; whole-response token budget still applies). text/items/detailed are summary-first: each memory shows its stored 1-2 sentence summary when available, else a content preview — fetch a full record via memory_id."
    • addedInput schema / properties / min_score
      Added value: +{
      +  "description": "Ranked-mode only. Minimum final score threshold before results are returned.",
      +  "maximum": 1,
      +  "minimum": 0,
      +  "type": "number"
      +}
    • addedInput schema / properties / recency_bias
      Added value: +{
      +  "description": "Ranked-mode only. Controls service recency boosting: auto lets the service infer, on forces boosting, off disables it.",
      +  "enum": [
      +    "auto",
      +    "on",
      +    "off"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / scope_fallback
      Added value: +{
      +  "description": "Ranked-mode only. Allow fallback outside the requested tag scope when scoped recall has weak evidence; diagnostics report tag_scope and outside_tag_scope.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / state_debug
      Added value: +{
      +  "default": false,
      +  "description": "Ranked-mode only. Include state-filter suppression/replacement IDs and reasons when current_only is true.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / state_mode
      Added value: +{
      +  "description": "Ranked-mode only. `current` returns active memories; `history` allows superseded/invalidated memories for audit timelines. Prefer this over current_only for new clients.",
      +  "enum": [
      +    "current",
      +    "history"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / entities
      Added value: +{
      +  "description": "Entity identity diagnostics injected by the service.",
      +  "items": {
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / exclude_tags
      Added value: +{
      +  "description": "Tags excluded from ranked recall.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / jit_enriched_count
      Added value: +{
      +  "description": "Number of memories enriched inline during recall.",
      +  "type": "integer"
      +}
    • addedOutput schema / properties / queries
      Added value: +{
      +  "description": "Query variants executed by the service.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / query
      Added value: +{
      +  "description": "Query text executed by ranked recall.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / query_time_ms
      Added value: +{
      +  "description": "Service recall latency in milliseconds.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / recency_bias
      Added value: +{
      +  "description": "Recency bias mode applied by the service.",
      +  "enum": [
      +    "auto",
      +    "on",
      +    "off"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / results / items / properties / content / description
      Added value: +"Memory content (preview in budgeted formats; omitted when summary is shown)."
    • addedOutput schema / properties / results / items / properties / content_chars
      Added value: +{
      +  "description": "Original content length when content was previewed or replaced by summary.",
      +  "type": "integer"
      +}
    • addedOutput schema / properties / results / items / properties / content_truncated
      Added value: +{
      +  "description": "True when content is a preview; fetch the full record via recall_memory({ memory_id }).",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / results / items / properties / deduped_from
      Added value: +{
      +  "description": "Result IDs merged into this result during multi-query deduplication.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / results / items / properties / jit_enriched
      Added value: +{
      +  "description": "True when the service enriched the memory during recall.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / results / items / properties / outside_tag_scope
      Added value: +{
      +  "description": "True when scope_fallback admitted this result outside the requested tag scope.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / results / items / properties / state_replaces
      Added value: +{
      +  "description": "ID of the suppressed memory this result replaced during current-state filtering.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / results / items / properties / summary
      Added value: +{
      +  "description": "Stored 1-2 sentence summary. In budgeted formats it replaces content when present.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / results / items / properties / updated_at
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / scope_fallback
      Added value: +{
      +  "description": "True when recall allowed outside-scope fallback results.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / score_filter
      Added value: +{
      +  "description": "Score filtering diagnostics such as min_score, adaptive_floor, and filtered_count.",
      +  "type": "object"
      +}
    • addedOutput schema / properties / sort
      Added value: +{
      +  "description": "Sort mode applied by the service.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / state_filter
      Added value: +{
      +  "description": "Current-state filtering diagnostics. Includes aggregate counts by default and detailed IDs/reasons only when state_debug=true.",
      +  "type": "object"
      +}
    • addedOutput schema / properties / state_mode
      Added value: +{
      +  "description": "State mode applied by ranked recall.",
      +  "enum": [
      +    "current",
      +    "history"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / tag_scope
      Added value: +{
      +  "description": "Tag-scope diagnostics including whether scoped evidence was strong enough.",
      +  "type": "object"
      +}
    • addedOutput schema / properties / truncation
      Added value: +{
      +  "description": "Present when trailing results were dropped to fit the response budget: { applied, omitted_results, reason }.",
      +  "type": "object"
      +}
    • addedOutput schema / properties / vector_search
      Added value: +{
      +  "description": "Vector-search diagnostics from the service.",
      +  "type": "object"
      +}
  4. First observedv0.14.0

TDQS

A4.4/5.0
Behavior3/5

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

The annotations already declare readOnlyHint=true and idempotentHint=true, so the safety profile is largely covered. The description still adds genuine operational detail: endpoint routing (GET /memory/{id}, GET /memory/by-tag), that mode 1 updates last_accessed, that ranked mode is server-clamped to ~50 and has no offset, that token budgets apply, and which parameter combinations are rejected. However, 'updates last_accessed' is a state mutation not reflected in readOnlyHint, and the description doesn't reconcile that tension or explain why the tool remains read-only — a small but real disclosure gap for a tool with 38 parameters.

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?

Structure is strong — modes are front-loaded and bolded, decision rules are bulleted, examples are labeled by mode — so an agent can scan to the relevant section fast. It is nonetheless long, and the five examples partly restate rules already stated in prose, which is defensible for a 38-param dispatcher but not maximally tight.

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

Completeness5/5

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

Given 38 optional parameters, high enum count, a full output schema, and read-only annotations, the description supplies everything an agent needs to choose a mode and populate the right params: mode triggers, defaults, pagination behavior, rejected combinations, and worked examples. Return-value explanation is correctly delegated to the output schema rather than duplicated.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description goes well beyond per-parameter docs by explaining cross-parameter semantics: which param activates which mode, that memory_id causes all other params to be ignored, and that tag_match: 'prefix' plus tag_mode: 'all' are rejected in enumeration mode. That mode-dispatch logic is not expressible in the JSON schema and is the single most important thing to get right here. It stops short of 5 because many of the 38 secondary params (recency_bias, adaptive_floor, expansion_limit, etc.) are left entirely to the schema.

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?

The opening sentence names a specific verb and resource ('Recall memories from AutoMem') and immediately introduces the three-mode structure that defines the tool's identity. The mode descriptions (ID fetch, tag enumeration, ranked retrieval) make it trivially distinguishable from siblings like store_memory, update_memory, and delete_memory, which are all single-purpose mutations.

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?

It gives explicit when-to-use guidance per mode: a bulleted list of ranked-recall scenarios (conversation start, pre-decision checks, debugging, multi-hop questions) and a contrasting rule for enumeration ('when you need to know *how many* memories carry a tag'). It also states the key exclusion — ranked recall undercounts large tag sets, so use mode 2 for cleanup/audit — which is exactly the kind of routing guidance that prevents wrong-tool selection.

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