Skip to main content
Glama

session_search

Searches raw session archives for exact phrases or keywords when memory search has no confident hit, returning original wording plus session title, date, and surrounding context.

Instructions

Search the raw session archive (L3) for exact phrases or keywords. Use when memory_search has no confident hit, or when you need to see the original wording. Returns session title/date plus a context window around the hit. Use it for 原话 / 逐字引用 / 「他当时怎么说的」. Do NOT use it for 方案结论 / 长期事实 — use memory_search first; and not for 时间线 / 未决状态 — use journal_recall. (选我:逐字原话/「他当时怎么说的」。要全景用 memory_recall;只查时间线用 journal_recall.)

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": "session_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax results, default 5, max 10.
queryYesKeyword or original phrase.
contextNoMessages of context around the hit, default 1, max 3.
date_toNoYYYY-MM-DD upper bound (optional); also auto-detected from query.
date_fromNoYYYY-MM-DD lower bound (optional); also auto-detected from query.
timeline_daysNoAlso return later sessions on the same topic within N days of the hit, default 30, 0 disables.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does disclose the return shape ("session title/date plus a context window around the hit") and a non-obvious side effect of timeline_days (also returns later sessions on the same topic). It does not state access requirements, cost, or whether the archive is read-only, which is a minor gap for a search tool.

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

Conciseness3/5

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

The English guidance is front-loaded and well ordered (purpose, when, what it returns, when not), but the trailing Chinese parenthetical repeats the same routing advice already given in English, adding length without new information. Useful content, some redundancy.

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 6-parameter read tool with no annotations and no output schema, the description compensates by describing what comes back (title/date plus context window) and how timeline_days widens results. Only the interaction between date bounds and auto-detected dates in the query is left to the schema, which is acceptable.

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 description coverage is 100%, so defaults and bounds for limit, context, date_from/date_to, and timeline_days are already documented. The description only adds the notion of a "context window around the hit," which loosely maps to the context parameter but adds no syntax or edge-case detail beyond the schema; baseline 3 applies.

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 the raw session archive (L3) for exact phrases or keywords," and immediately distinguishes itself from memory_search, memory_recall, and journal_recall by naming each. An agent can tell which tool to reach for without opening any schema.

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?

Explicit when-to-use ("memory_search has no confident hit", "need to see the original wording") and explicit when-not-to-use with named alternatives for both excluded cases (long-term facts -> memory_search, timeline/unresolved state -> journal_recall, panorama -> memory_recall). Nothing is left to inference.

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