memo_search
Search durable memories by keyword, semantic, or hybrid mode. Retrieve ranked hits with dates, tags, and excerpts for informed decisions.
Instructions
Search durable memories by text, vector similarity, or hybrid mode.
Read-only. Returns raw ranked hits — source records with ids, dates, tags, and excerpts. Use memo_context instead for a budgeted prompt-ready pack, memo_search_trace for scoring diagnostics, and memo_rerank to reorder hits you already have.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | Keep only hits whose capture-stamped files_read/files_modified arrays contain this path fragment (case-insensitive substring). Date filters and explain are not applied in file mode. | |
| mode | No | Retrieval mode: 'hybrid' (RRF fusion of vector + BM25, default), 'vec' (semantic only), 'bm25' (keyword FTS5), 'exact' (strict-AND keyword with tag/title boost), or 'fuzzy' (typo-tolerant keyword). Unrecognized values behave as 'hybrid'. | hybrid |
| type | No | Restrict retrieval to one memory type (e.g. 'decision', 'fact'); None searches every type. | |
| when | No | Natural-language date phrase (EN/ES: 'yesterday', 'last week', 'hace 3 dias', ...) parsed into date_from/date_to when neither is set; unrecognized phrases apply no date filter. | |
| limit | No | Maximum hits to return (clamped to 1-500). | |
| query | Yes | Search text; empty or whitespace-only returns no hits. | |
| source | No | Calling layer for consult attribution (e.g. 'claude-code', 'codex'); empty falls back to client info. | |
| date_to | No | Inclusive ISO date/datetime upper bound; a bare date covers that whole day. Ignored when 'file' is set. | |
| explain | No | When true, add per-hit 'explain' fields and a 'trace' key showing pipeline scoring. Not available with 'file' (explain stays empty). | |
| date_from | No | Inclusive ISO date/datetime lower bound (e.g. '2026-07-01'); ignored when 'file' is set. | |
| body_chars | No | Character cap per hit body; longer bodies are truncated with body_truncated=true. Negative disables truncation. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||