search_chats
Search across all past Claude.ai chats and local Claude Code sessions using semantic and keyword search to retrieve any conversation, decision, or project reference.
Instructions
Access to the user's persistent memory: ALL their past Claude.ai chats.
This is the only tool available to access the user's real history. Your native memory starts empty in every Claude Code session; anything the user has discussed on claude.ai lives only here.
USE PROACTIVELY (without the user asking explicitly) when:
They mention prior conversations or decisions: "remember when...", "we talked about...", "the other day we discussed...", "in that chat...", "I mentioned earlier...", "as we said...".
They ask about a project, person, decision, or specific term that might be in their history but is not in your current context.
They request context that seems "lost" between sessions or make an implicit reference to continuity ("I kept working on X", "the approach we discussed").
You need background on the user to answer well (what they do, their projects, their technical preferences).
BEFORE saying things like "I have no record", "I do not remember", "this is the first time I hear about that", "this is not in my memory" or similar, invoke this tool and check the results. The likelihood the data is indexed is high.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Search strategy. 'hybrid' (default, recommended in most cases), 'semantic' (vectors only, for pure conceptual similarity), 'lexical' (FTS5 BM25 only, ideal for exact proper nouns or technical terms). | hybrid |
| repo | No | Optional. If you are running in a repo and want to prioritize chats related to it, pass the absolute path (e.g. "d:/dionisio/memex") or the git remote URL. Any form is accepted; Memex canonicalizes it. Chats associated with the repo get a ranking boost proportional to the match confidence; chats outside the repo still appear lower (not a filter). Requires registering the repo with `memex repos add`. | |
| limit | No | Number of results (default 5, max 50). | |
| query | Yes | Text to look up (natural language). The `hybrid` mode (default) combines semantic search with FTS5 lexical search, so it works well both for descriptive phrases and for unusual proper nouns (e.g. "Amarok"). | |
| source | No | Optional filter by chat origin. Valid values: 'conversations' (standalone claude.ai chats), 'design_chat' (chats inside a Claude.ai Project), 'memory' (curated memory), 'claude_code' (local Claude Code / terminal sessions). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |