Skip to main content
Glama
daniellmorris

local-claude-chat-history-mcp

Search Claude history

search_history

Full-text search across local Claude Code and Cowork conversation history. Returns matching message snippets with session IDs for full context retrieval.

Instructions

Full-text search across local Claude Code and Claude Cowork conversation history stored on this machine. Returns matching message snippets with session IDs (use get_session to read the full conversation). Searches newest sessions first — good for questions like "what did I work on today" or "when did I last touch X".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
roleNoOnly match messages from this roleany
afterNoOnly sessions active after this ISO date (e.g. "2026-06-01")
limitNoMax total matches to return
queryYesText to search for (case-insensitive substring, or a regex when regex=true)
regexNoTreat query as a JavaScript regular expression
beforeNoOnly messages before this ISO date
sourceNoHistory source: "code" = Claude Code (~/.claude/projects), "cowork" = Claude Cowork local desktop sessions, "all" = bothall
projectNoCase-insensitive substring filter on project path/name or session title
maxPerSessionNoMax matches returned per session
Behavior4/5

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

With no annotations provided, the description carries full burden. It discloses the tool is read-only (search), returns snippets and session IDs, searches newest first, works on local storage, and supports sources (code, cowork). It doesn't mention regex or maxPerSession directly, but those are in the schema.

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?

Three sentences with no wasted words. First sentence states the core function, second explains output and links to sibling tool, third gives examples and ordering. Front-loaded and efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, the description adequately explains return values (snippets, session IDs) and ordering. It covers main behavioral aspects for a 9-parameter search tool, though it doesn't elaborate on all parameters (schema covers them).

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 beyond schema by explaining the search order, multiple sources, and the relationship to get_session, aiding the agent in understanding how parameters like source and ordering affect results.

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 it performs full-text search across local conversation history from two sources (Claude Code and Claude Cowork), returns message snippets with session IDs, and differentiates from sibling tool get_session by directing users to read full conversations there. It also provides concrete example queries.

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

Usage Guidelines4/5

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

The description gives explicit usage context ('good for questions like...'), states the ordering ('searches newest sessions first'), and references get_session as the tool for full conversations. However, it does not explicitly specify when not to use this tool or mention alternatives like list_sessions.

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/daniellmorris/local-claude-chat-history-mcp'

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