Skip to main content
Glama

search

Semantically retrieve Claude Code session events by describing them in natural language. Apply filters for event type, session, project, tool, or file path.

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?

Without annotations, description implies read-only by stating 'Returns events'. No contradictions, but could be more explicit about side effects.

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 purpose, every sentence adds value with guidance and alternatives.

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?

Covers purpose, filters, and usage guidance for a tool with many parameters and no output schema; could clarify filter combination logic.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema already describes all 9 parameters with 100% coverage; description adds usage advice ('Always pass session_id') but no additional semantic meaning beyond schema.

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 'Semantic search across all stored Claude Code session events' and distinguishes from sibling 'search_in_context' for conversation context retrieval.

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?

Explicitly advises always passing session_id to avoid noisy results, and directs to search_in_context when surrounding context is needed.

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