Skip to main content
Glama

search_sessions

Read-only

Search past AI-agent sessions across projects to recover earlier questions, decisions, commands, and results before redoing work or when referencing prior work.

Instructions

Search the user's past AI-agent sessions (Codex, Claude Code, Cursor, Cowork): what was asked, decided, run and reported, across projects. Use it before redoing work or when the user refers to earlier work ("what did we decide about X", "which commit fixed Y", "the numbers from the last run"). Each item is an original record with episode_id; use open_record for context.

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
kNo
hostNo
queryYes
rolesNo
sinceNoISO date
untilNoISO date
projectNosubstring of the project folder or Cowork label, e.g. my-app, precision-memory, cowork:notes
qualityNoleave unset: the server default waits for the reranker (best precision)
budget_tokensNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered. The description adds real behavioral context beyond that: results are original records carrying an episode_id, and the correct next step for deeper context is open_record rather than re-querying. It does not describe result ordering, pagination, or what happens when no matches exist.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with the capability before the usage triggers and the routing hint. The parenthetical example queries are slightly verbose but they carry real disambiguation value, so almost every clause earns its place.

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?

For a 9-parameter, no-output-schema tool, the description covers purpose and next-step routing adequately but leaves most parameter behavior and the return shape unexplained. An agent would know when to call it and what to do afterward, but not how to tune k, roles, or budget_tokens from the description alone.

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

Parameters2/5

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

Schema description coverage is only 44% across 9 parameters, so the description is expected to compensate, and it largely does not. Its only contribution is naming the host values (Codex, Claude Code, Cursor, Cowork), which maps to the host enum; k, roles, query, and budget_tokens receive no added meaning anywhere.

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?

States a specific verb and resource (search past AI-agent sessions) and enumerates the covered sources (Codex, Claude Code, Cursor, Cowork) plus the content indexed (what was asked, decided, run and reported). It also names a sibling, open_record, for the different job of getting context, so an agent can distinguish the two without opening schemas.

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?

Gives explicit triggers: use before redoing work, or when the user references earlier work, with three concrete example phrasings. It also routes follow-up context retrieval to open_record. It stops short of stating exclusions relative to the other search_* siblings (docs, notes), so it is strong but not fully exhaustive.

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