Skip to main content
Glama

chats_search

Read-onlyIdempotent

Search cached chat history offline with full-text queries against the local SQLite library, without opening the browser. Filter results by provider or browser library to find relevant conversation turns.

Instructions

Full-text search across the local SQLite library (all cached chats) without hitting the browser. Prefer after library_ingest / export_batch / chats_get have filled the cache. Use chat_cache_read when searching inside one known chatId. Offline; no host_state/paywall.

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

Input Schema

NameRequiredDescriptionDefault
limitNoMax hit rows (1-200)
queryYesFTS5 query over cached turn text across chats
maxCharsNoHard cap on returned characters (200-200000)
platformNoLimit hits to one provider
browserIdNoLimit hits to one browser library

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.1.1

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover readOnly, idempotent, non-destructive and closed-world, but the description adds genuinely new behavioral facts: the search runs offline, does not touch the browser, skips host_state/paywall, and depends on the cache being populated first. It does not discuss result ranking, pagination, or what happens on an empty/cold cache, which keeps it short of a 5.

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 tight sentences with the core capability front-loaded and zero filler. Minor noise from unexplained shorthand ('host_state/paywall') and the references to tools outside the visible catalog, which cost a bit of clarity without bloat.

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 five-parameter read-only search with full schema coverage and no output schema, the description covers the essentials: data source, cache precondition, offline behavior, and the sibling to use for a narrower scope. Return shape and result-ordering behavior are left unstated, which is the main remaining gap.

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 the schema already defines query (FTS5), limit, maxChars, platform enum, and browserId. The description's only real addition is the default scope — hits span all cached chats and all providers unless narrowed — which is useful but thin. Baseline 3 applies when the schema carries the parameter burden.

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 — full-text search over the local SQLite cache of all chats — and immediately scopes it with 'without hitting the browser.' It explicitly distinguishes itself from chat_cache_read (single known chatId), so an agent can pick between the two without opening a schema.

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 a clear precondition ('Prefer after library_ingest / export_batch / chats_get have filled the cache') and names the alternative tool with the condition that selects it ('Use chat_cache_read when searching inside one known chatId'). The only weakness is that library_ingest and export_batch are not in the sibling list supplied, so part of the prerequisite chain may point at tools the agent cannot resolve.

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