Skip to main content
Glama

search

Search stored Claude Code session events using natural language queries. Apply filters by event type, session, project, or file path to retrieve relevant past interactions.

Instructions

Semantic search across all stored Claude Code session events. Returns events matching a natural language query, with optional filters by event type, session, project, tool, or file path. IMPORTANT: Always pass session_id when you know which session to search — unscoped search returns noisy results. For finding a discussion WITH surrounding conversation context, use search_in_context instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesNatural language query
limitNoMax results (default 10)
session_idNoScope search to a single session (prefix match)
project_idNoScope search to a project by project_id
project_nameNoScope search to a project by name substring (e.g. 'gonzo')
event_typeNoFilter: user_message, assistant_text, assistant_thinking, tool_call, tool_result
tool_nameNoFilter by tool name (Edit, Bash, Read, etc.)
file_path_containsNoFilter to events with an explicit file_path containing this string (tool_call/tool_result events only — user messages won't have file_path metadata)
max_charsNoMax total output characters (default 12000). Set higher if you need full content.
Behavior4/5

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

No annotations provided, so description carries full burden. It discloses that unscoped search yields noisy results and that file_path_contains filters only apply to tool_call/tool_result events. This adds useful behavioral context beyond 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?

Four sentences, front-loaded with purpose, each sentence adds distinct value. No redundant or vague language.

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

Completeness3/5

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

Tool has 9 parameters and no output schema, but description does not specify return value structure. It mentions 'returns events' but omits details like event types, metadata, or pagination, leaving some gaps for an agent to understand the output.

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%, but description adds value by emphasizing session_id importance, clarifying file_path_contains limitations, and explaining max_chars default. This compensates for the absence of enums or nested objects.

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?

Description clearly states it performs semantic search over session events with optional filters. Explicitly differentiates from sibling tool search_in_context by stating its purpose for finding discussions with surrounding context.

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?

Provides explicit guidance: always pass session_id when possible to avoid noisy results, and directs to search_in_context for discussions needing surrounding context. This helps the agent choose correctly.

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/Wynelson94/longhand'

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