Skip to main content
Glama
Gunther-Schulz

claude-session-mcp

search

Search past Claude Code sessions by text query to find conversation matches with context and branch details. Filter by project and include subagent sessions for thorough retrieval.

Instructions

Full-text search across Claude Code session history.

Searches conversation text (user and assistant messages) with fork awareness. Returns matches with surrounding conversational context and branch info.

Args: query: Search text (case-insensitive substring match). project: Project slug to filter by. Empty for all projects. max_results: Maximum results (default 10, max 50). include_subagents: Also search subagent session files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
projectNo
max_resultsNo
include_subagentsNo

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 the full burden. It discloses case-insensitive substring matching, fork awareness, max result limits, optional subagent inclusion, and the return of surrounding conversational context and branch info. While it does not explicitly state read-only behavior, it is evident from 'search' that no side effects occur.

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 concise: a one-line purpose, a sentence on scope/return value, and a clear Args list. No filler or repetition. It is front-loaded with the most important information and every sentence adds value.

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?

The tool is moderately complex with four parameters and an output schema. The description covers search scope, return format, fork awareness, parameter behavior, and constraints (max 50 results). Since an output schema exists, not detailing return fields is appropriate. This is complete enough for an agent to invoke correctly.

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

Parameters5/5

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

The schema provides no property descriptions, but the description's Args section explains every parameter: query (search text, case-insensitive), project (filter, empty for all), max_results (default 10, max 50), and include_subagents (search subagent files). This fully compensates for the 0% schema coverage.

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 opening sentence 'Full-text search across Claude Code session history' uses a specific verb (search) plus a clear resource (session history), and the description clarifies that it searches conversation text with fork awareness and returns context/branch info. This clearly distinguishes it from sibling tools that list projects/sessions or retrieve threads/trees.

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 clear context: this is the tool for searching text across sessions, with optional filtering by project and subagents. It does not explicitly mention alternatives or when not to use it, but the context is unambiguous enough that an agent would use it for free-text search rather than listing or retrieval tasks.

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/Gunther-Schulz/claude-session-mcp'

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