Skip to main content
Glama

search_sessions

Search earlier Claude Code and Codex sessions to find what was said before. Returns ranked snippets within a token budget, so you can recover past context without loading full transcripts.

Instructions

Search what was said in earlier captured Claude Code and Codex sessions of this project. Returns compact, ranked snippets within a token budget; use get_session_excerpt for context. Captured sessions are history, not approved decisions.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "search_sessions"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesWords to look for in earlier Claude Code / Codex sessions (English or Armenian; quotes for phrases).
budget_tokensNoApproximate token budget for the results (default 1500, max 6000).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.1-alpha.2

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses useful behavior: results are compact and ranked, constrained by a token budget, and advisory rather than authoritative history. It does not explain ranking basis, matching semantics, or what happens when the budget truncates results, which matters for an agent reasoning over partial output.

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 short sentences, front-loaded with purpose, then return shape, then the routing hint and the epistemic caveat. No filler.

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?

For a two-parameter read tool with no output schema, the definition covers purpose, result shape, budget behavior, an escape hatch to a sibling, and a trust caveat about the returned content. Missing is any statement of result ordering/ranking criteria or behavior on zero matches, but the essentials an agent needs are present.

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 coverage is 100% and already documents query language support (English/Armenian, quoted phrases) and the budget_tokens default and maximum. The description adds nothing parameter-level beyond what the schema states, so the baseline 3 applies.

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

Purpose4/5

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

States a specific verb (search) and resource (content of earlier Claude Code / Codex sessions in this project), with the notable scope bound 'earlier... of this project'. It distinguishes itself from search_memory only implicitly by naming the source corpus, and it names get_session_excerpt as an alternative.

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?

Clearly directs the agent to use get_session_excerpt for context when snippets are insufficient, and adds the important caveat 'Captured sessions are history, not approved decisions'. It does not differentiate from search_memory, which is the most plausible confusable sibling, so a small gap remains.

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