Skip to main content
Glama

memory_recall

Search and retrieve stored thoughts across projects, inspect related context and chains, and list memories by status, tag, or cluster to recover decisions and context across sessions.

Instructions

Search and retrieve thoughts. One envelope per action: collections answer { items, meta }, single objects { item, meta }; meta carries reason and preview when they apply. Id lookup runs before both search legs: a full UUID is an explicit reference and ignores status/cwd/tag/min_importance, while a hex prefix of 13+ characters is only a timestamp window, so it takes the status/cwd/tag/min_importance scope of the call like any other query, falling back to the ordinary search when it addresses nothing inside it. is_cluster is a shape constraint, not a scope. Actions: search (hybrid RRF by default, vector-only with hybrid=false; is_cluster=true is the cluster-only preset; may mutate via primer promotion/hit count), get, context (chain's { thought, upstream, downstream } view from a query or a thought_id), chain, list (paged inventory without a query: status/cwd/tag/is_cluster, limit/offset, total in meta.counts). Status defaults: search active, list all. cwd is optional for search, list and context: it scopes to one project, and omitted it answers across every project with a meta.warnings note; get/chain accept and ignore it. Output: compact (default) returns id, content, status, tags, project; compact=false or fields widen it.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "action": "<action>"
    },
    "name": "memory_recall"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdNoWorking directory — resolves the project scope reported in meta.scope. OPTIONAL for search/list/context: omitting it (or passing no registered path) answers across every project and says so in meta.warnings. ACCEPTED AND IGNORED for get/chain.
tagNoFilter by tag (search/list). REJECTED for get/context/chain.
modeNoRemoved; use hybrid.
limitNoMax results for search (default 10) or list page size (default 50). REJECTED for get/context/chain.
queryNoSearch query (REQUIRED for search; accepted by context as an alternative to thought_id). REJECTED for get/chain/list.
top_kNoRemoved; use limit.
actionYesAction
fieldsNoThought columns to include in each output thought. Selects on the shaped thought only, so the ranking metadata (scores, match_source — which also drops the ['id'] label of an id-addressed hit) is dropped from search hits when set; safety annotations (standing, superseded_by, contradicted_by, low_confidence) and get's include_edges output are not thought columns and remain. Explicit fields win over compact. OPTIONAL for all actions.
hybridNoHybrid search: true (default) fuses the vector and BM25 legs via RRF; false restricts results to the vector (embedding) leg only. (search only).
offsetNolist only: offset for pagination. REJECTED for all other actions.
statusNoFilter by status (search default: active; list default: all). REJECTED for get/context/chain.
clusterNoRemoved; use is_cluster.
compactNoCompact output (default true): each hit keeps the minimal thought fields (id, content, status, tags as strings, project) and no score block, but safety annotations are never hidden — standing is emitted unless it is "current", and superseded_by/contradicted_by plus low_confidence: true whenever they apply. compact=false adds the opt-in ranking metadata: scores { similarity, distance, rrf_score, bm25_score, relevance, recency_score, final_score }, match_source, and the neutral standing: "current"/low_confidence: false values. Also shapes the thought objects of get/context/chain/list; get's include_edges output stays under both settings.
directionNoTraversal direction (default: both) (context/chain only).
is_clusterNoCluster filter: true = cluster thoughts only, false = exclude cluster thoughts (search/list). REJECTED for get/context/chain.
max_degreeNoMax edges to return for chain/context/get (default 50, 1-200). REJECTED for search/list.
project_idNoRemoved; use cwd.
thought_idNoREQUIRED for "get" and "chain"; also accepted by "context" (alternative to query). REJECTED for "search", "list".
include_edgesNoget only: when true, return incident edges inline (upstream/downstream with type and created_at). Default false.
min_relevanceNoRelevance gate on the calibrated relevance scale (0-1). Omitted = the measured default 0.4 (a raw cosine of 0.84): cosine-only hits below the threshold are dropped, while BM25-anchored and explicit-id rows are never gated. An explicit 0 disables the gate and restores the fail-open result set. Dropped rows appear as meta.counts.filtered_out, not as a reason (search only; memory_recall action=context is exempt from the default gate and keeps its pre-gate best match, so a gate there is a service-level opt-in).
min_importanceNoMinimum importance (0-1) (search only).
recency_weightNoOpt-in recency boost weight (0-1). 0/default preserves relevance-only ranking; >0 adds recency_weight × 0.5^(ageDays/halfLifeDays) to the relevance score and returns recency_score + final_score (search only).
group_by_clusterNoGroup results by cluster (search only).
include_url_linksNoWhen true, every thought the answer emits carries url_links: [{text, url, label}] ordered by sort_order then creation (text is the stored link key that memory_store create and update set — update replaces the whole set, merge moves the source's links to the target — and label defaults to text). One batch query per response. Default false, where the key is absent; true with no links returns []. Never trimmed by fields and never hidden by compact. Applies to all five actions, including get's upstream/downstream neighbours and chain/context neighbourhoods.
supersession_modeNoSuperseded thoughts: off (no annotation), flag (annotate), suppress (drop). Agent default: suppress (search only).
contradiction_modeNoContradicted thoughts: off or flag (default). Contradicted endpoints are never suppressed (search only).
recency_half_life_daysNoRecency decay half-life in days (default 30, 1-3650); only used when recency_weight > 0 (search only).

Output Schema

NameRequiredDescriptionDefault
resultYesAction payload (structuredContent.result); JSON mirror of content[].text, except the raw-text config action, whose result is { item: { text }, meta }

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed15 schema fields changedv0.26.6
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "search",
      -  "get",
      -  "context",
      -  "chain",
      -  "clusters",
      -  "list"
      -]New value: +[
      +  "search",
      +  "get",
      +  "context",
      +  "chain",
      +  "list"
      +]
    • changedInput schema / properties / cwd / description
      Previous value: -"Working directory — resolves the project scope reported in meta.scope. OPTIONAL for search/clusters/list/context: omitting it (or passing no registered path) answers across every project and says so in meta.warnings. ACCEPTED AND IGNORED for get/chain."New value: +"Working directory — resolves the project scope reported in meta.scope. OPTIONAL for search/list/context: omitting it (or passing no registered path) answers across every project and says so in meta.warnings. ACCEPTED AND IGNORED for get/chain."
    • changedInput schema / properties / hybrid / description
      Previous value: -"Hybrid search: true (default) fuses the vector and BM25 legs via RRF; false restricts results to the vector (embedding) leg only. (search/clusters only)."New value: +"Hybrid search: true (default) fuses the vector and BM25 legs via RRF; false restricts results to the vector (embedding) leg only. (search only)."
    • changedInput schema / properties / include_url_links / description
      Previous value: -"When true, every thought the answer emits carries url_links: [{text, url, label}] ordered by sort_order then creation (text is the stored link key that memory_store create and update set — update replaces the whole set, merge moves the source's links to the target — and label defaults to text). One batch query per response. Default false, where the key is absent; true with no links returns []. Never trimmed by fields and never hidden by compact. Applies to all six actions, including get's upstream/downstream neighbours and chain/context neighbourhoods."New value: +"When true, every thought the answer emits carries url_links: [{text, url, label}] ordered by sort_order then creation (text is the stored link key that memory_store create and update set — update replaces the whole set, merge moves the source's links to the target — and label defaults to text). One batch query per response. Default false, where the key is absent; true with no links returns []. Never trimmed by fields and never hidden by compact. Applies to all five actions, including get's upstream/downstream neighbours and chain/context neighbourhoods."
    • changedInput schema / properties / is_cluster / description
      Previous value: -"Cluster filter: true = cluster thoughts only, false = exclude cluster thoughts (search/clusters/list). REJECTED for get/context/chain."New value: +"Cluster filter: true = cluster thoughts only, false = exclude cluster thoughts (search/list). REJECTED for get/context/chain."
    • changedInput schema / properties / limit / description
      Previous value: -"Max results for search/clusters (default 10) or list page size (default 50). REJECTED for get/context/chain."New value: +"Max results for search (default 10) or list page size (default 50). REJECTED for get/context/chain."
    • changedInput schema / properties / max_degree / description
      Previous value: -"Max edges to return for chain/context/get (default 50, 1-200). REJECTED for search/clusters/list."New value: +"Max edges to return for chain/context/get (default 50, 1-200). REJECTED for search/list."
    • changedInput schema / properties / min_importance / description
      Previous value: -"Minimum importance (0-1) (search/clusters only)."New value: +"Minimum importance (0-1) (search only)."
    • changedInput schema / properties / min_relevance / description
      Previous value: -"Relevance gate on the calibrated relevance scale (0-1). Omitted = the measured default 0.4 (a raw cosine of 0.84): cosine-only hits below the threshold are dropped, while BM25-anchored and explicit-id rows are never gated. An explicit 0 disables the gate and restores the fail-open result set. Dropped rows appear as meta.counts.filtered_out, not as a reason (search/clusters only; memory_recall action=context is exempt from the default gate and keeps its pre-gate best match, so a gate there is a service-level opt-in)."New value: +"Relevance gate on the calibrated relevance scale (0-1). Omitted = the measured default 0.4 (a raw cosine of 0.84): cosine-only hits below the threshold are dropped, while BM25-anchored and explicit-id rows are never gated. An explicit 0 disables the gate and restores the fail-open result set. Dropped rows appear as meta.counts.filtered_out, not as a reason (search only; memory_recall action=context is exempt from the default gate and keeps its pre-gate best match, so a gate there is a service-level opt-in)."
    • changedInput schema / properties / query / description
      Previous value: -"Search query (REQUIRED for search/clusters; accepted by context as an alternative to thought_id). REJECTED for get/chain/list."New value: +"Search query (REQUIRED for search; accepted by context as an alternative to thought_id). REJECTED for get/chain/list."
    • changedInput schema / properties / recency_half_life_days / description
      Previous value: -"Recency decay half-life in days (default 30, 1-3650); only used when recency_weight > 0 (search/clusters only)."New value: +"Recency decay half-life in days (default 30, 1-3650); only used when recency_weight > 0 (search only)."
    • changedInput schema / properties / recency_weight / description
      Previous value: -"Opt-in recency boost weight (0-1). 0/default preserves relevance-only ranking; >0 adds recency_weight × 0.5^(ageDays/halfLifeDays) to the relevance score and returns recency_score + final_score (search/clusters only)."New value: +"Opt-in recency boost weight (0-1). 0/default preserves relevance-only ranking; >0 adds recency_weight × 0.5^(ageDays/halfLifeDays) to the relevance score and returns recency_score + final_score (search only)."
    • changedInput schema / properties / status / description
      Previous value: -"Filter by status (search/clusters default: active; list default: all). REJECTED for get/context/chain."New value: +"Filter by status (search default: active; list default: all). REJECTED for get/context/chain."
    • changedInput schema / properties / tag / description
      Previous value: -"Filter by tag (search/clusters/list). REJECTED for get/context/chain."New value: +"Filter by tag (search/list). REJECTED for get/context/chain."
    • changedInput schema / properties / thought_id / description
      Previous value: -"REQUIRED for \"get\" and \"chain\"; also accepted by \"context\" (alternative to query). REJECTED for \"search\", \"clusters\", \"list\"."New value: +"REQUIRED for \"get\" and \"chain\"; also accepted by \"context\" (alternative to query). REJECTED for \"search\", \"list\"."
  2. First observedv0.1.0

TDQS

A4.1/5.0
Behavior5/5

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

It discloses the critical side effect that search 'may mutate via primer promotion/hit count', consistent with readOnlyHint=false, and explains id-lookup precedence, scope fallback, warnings, and output shaping. This adds substantial behavior beyond the annotations.

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?

The description front-loads purpose and output envelope, then covers id lookup and action behavior in a dense but information-rich paragraph. It is appropriately sized for a 27-parameter multi-action tool, though the single-paragraph wall of clauses could be easier to scan.

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?

With an output schema present and 100% schema coverage, the description still covers the action set, defaults, scoping, side effects, and envelope behavior needed to call the tool correctly. No major calling context is missing.

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 schema already defines all 27 parameters; the description still adds cross-parameter semantics such as full-UUID id lookup ignoring status/cwd/tag/min_importance, 13+ hex prefixes acting as timestamp windows, and cwd being ignored by get/chain. It stops short of 5 because many parameter details are already in the schema.

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

Purpose4/5

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

The opening 'Search and retrieve thoughts' names a specific verb and resource, and the action list clarifies that recall spans search/get/context/chain/list. It does not explicitly contrast with sibling tools such as memory_guide or memory_status, so it falls short of 5.

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

Usage Guidelines3/5

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

The description gives per-action conditions (list is paged inventory without a query; get/chain require thought_id; context accepts query or thought_id) and states defaults. However it does not say when to choose memory_recall over a sibling or when not to use it, so usage is implied rather than fully guided.

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