memory_search
Search the user's memories. Default mode is 'hybrid': blends semantic (cosine over Vectorize) and keyword (BM25 over SQLite FTS5) hits via Reciprocal Rank Fusion (k=60). Semantic catches paraphrases; keyword catches exact-string hits (IDs, dates, code snippets). Pass mode:'semantic' or mode:'keyword' to run just one. Content defaults to the LLM-optimized (compressed) form when available (raw:true to invert). Excludes forgotten + superseded. Optional filters narrow after retrieval: tags (AND), written_by, session_id, and/or since/until (ms epoch).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| k | No | Max results (1–50). Default 10. | |
| raw | No | Return original prose instead of the compressed form. Default false. | |
| mode | No | Retrieval mode. Default 'hybrid'. | |
| tags | No | Only return memories containing ALL of these tags (AND semantics). | |
| query | Yes | Search query. Interpreted as natural language for semantic mode and as FTS5-safe text for keyword mode. | |
| since | No | Only return memories created at or after this ms-epoch timestamp. | |
| until | No | Only return memories created strictly before this ms-epoch timestamp. | |
| session_id | No | Only return memories with an exact session_id match. | |
| written_by | No | Only return memories with an exact written_by match (e.g. 'claude-code'). |