Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
modeNoSearch 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
repoNoOptional. 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`.
limitNoNumber of results (default 5, max 50).
queryYesText 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").
sourceNoOptional 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

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries full burden. It explains persistent memory, the empty native context, and that data is likely indexed. It doesn't cover rate limits or auth, but for a read search tool this is adequate. The description adds behavioral context beyond what annotations would provide.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but well-structured with bullet points. It front-loads the core purpose, then provides specific usage scenarios. Every sentence earns its place; no redundancy or fluff.

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?

Given the complexity (5 parameters, output schema exists), the description is thorough. It covers when to use, behavioral details, and parameter context. No gaps remain; the agent has all necessary information to invoke the tool correctly.

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 baseline is 3. The description adds value by explaining when to use different modes (hybrid, semantic, lexical) and the purpose of the repo parameter (ranking boost, not a filter). This goes beyond the schema's parameter descriptions.

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

Purpose5/5

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

The description clearly states 'Access to the user's persistent memory: ALL their past Claude.ai chats' and distinguishes it as 'the only tool available to access the user's real history.' This sets a specific verb+resource and differentiates from sibling tools like get_chat and list_recent_chats.

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

Usage Guidelines5/5

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

The description explicitly lists scenarios for proactive use (e.g., when user mentions prior conversations, asks about projects) and instructs to invoke the tool before saying things like 'I have no record.' It provides clear context for when to use this vs. alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dioniipereyraa/memex'

If you have feedback or need assistance with the MCP directory API, please join our Discord server