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
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | 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. | |
| tag | No | Filter by tag (search/list). REJECTED for get/context/chain. | |
| mode | No | Removed; use hybrid. | |
| limit | No | Max results for search (default 10) or list page size (default 50). REJECTED for get/context/chain. | |
| query | No | Search query (REQUIRED for search; accepted by context as an alternative to thought_id). REJECTED for get/chain/list. | |
| top_k | No | Removed; use limit. | |
| action | Yes | Action | |
| fields | No | Thought 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. | |
| hybrid | No | Hybrid search: true (default) fuses the vector and BM25 legs via RRF; false restricts results to the vector (embedding) leg only. (search only). | |
| offset | No | list only: offset for pagination. REJECTED for all other actions. | |
| status | No | Filter by status (search default: active; list default: all). REJECTED for get/context/chain. | |
| cluster | No | Removed; use is_cluster. | |
| compact | No | Compact 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. | |
| direction | No | Traversal direction (default: both) (context/chain only). | |
| is_cluster | No | Cluster filter: true = cluster thoughts only, false = exclude cluster thoughts (search/list). REJECTED for get/context/chain. | |
| max_degree | No | Max edges to return for chain/context/get (default 50, 1-200). REJECTED for search/list. | |
| project_id | No | Removed; use cwd. | |
| thought_id | No | REQUIRED for "get" and "chain"; also accepted by "context" (alternative to query). REJECTED for "search", "list". | |
| include_edges | No | get only: when true, return incident edges inline (upstream/downstream with type and created_at). Default false. | |
| min_relevance | No | 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). | |
| min_importance | No | Minimum importance (0-1) (search only). | |
| recency_weight | No | 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). | |
| group_by_cluster | No | Group results by cluster (search only). | |
| include_url_links | No | 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. | |
| supersession_mode | No | Superseded thoughts: off (no annotation), flag (annotate), suppress (drop). Agent default: suppress (search only). | |
| contradiction_mode | No | Contradicted thoughts: off or flag (default). Contradicted endpoints are never suppressed (search only). | |
| recency_half_life_days | No | Recency decay half-life in days (default 30, 1-3650); only used when recency_weight > 0 (search only). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes | Action payload (structuredContent.result); JSON mirror of content[].text, except the raw-text config action, whose result is { item: { text }, meta } |