Skip to main content
Glama

Search local cache (FTS5)

cache_search
Read-onlyIdempotent

Search previously fetched pages stored in the local index to recall information and avoid re-fetching content. Uses FTS5 query syntax for exact and partial matches.

Instructions

Full-text search over pages already fetched into the local SQLite FTS5 index.

Best for:
- Recalling something the user/agent fetched earlier in the conversation
  ("what did that Wikipedia page say about X").
- Avoiding re-fetching content already in the local cache.
- Quick keyword grep across the corpus you've built up.

Not recommended for:
- Discovering new pages on the open web -> use `search` or `research`.
- When the cache is empty (fresh install) -> `search`/`research` first to
  populate it.

Returns:
- markdown (default): a per-hit list of title, URL, and a `[bracket]`-
  highlighted snippet around the matched terms.
- json: list of {url, title, snippet, author, date, sitename}. The last
  three are "" when the cached row predates metadata capture.

Common mistakes:
- Treating this like web search: it ONLY hits pages already in the local
  cache. If the user hasn't fetched anything, you'll get zero hits.
- Using natural-language phrases without quoting them; FTS5 splits on
  whitespace as AND. For an exact phrase use `"like this"`.

Args:
    query: FTS5 query. Bare terms = AND. Supports OR / NOT, prefix
        (`term*`), and phrase (`"exact phrase"`).
    limit: Max hits to return.
    format: "markdown" or "json".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYes
formatNomarkdown

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.12.0
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "result": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "items": {
      -            "additionalProperties": true,
      -            "type": "object"
      -          },
      -          "type": "array"
      -        }
      -      ],
      -      "title": "Result"
      -    }
      -  },
      -  "required": [
      -    "result"
      -  ],
      -  "title": "cache_searchOutput",
      -  "type": "object"
      -}New value: +null
  2. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, so safety is covered. The description goes well beyond by disclosing FTS5 semantics (AND on whitespace, phrase quoting, prefix/OR/NOT), return format differences, and the common mistake of treating it like web search. It adds rich behavioral context without contradicting annotations.

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?

The description is structured with clear sections and front-loaded with the core purpose. It's longer than average but each section (best-for, not-recommended, returns, mistakes, args) adds distinct value. Slightly verbose, but nothing is redundant or filler.

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 has 3 params and no output schema, so the description must cover both invocation and return semantics. It does: it explains the return formats, metadata caveats, and pitfalls. An agent has everything needed to call this correctly, including edge cases like empty cache and phrase quoting.

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?

Schema description coverage is 0%, so the description carries full burden. It explains `query` with FTS5 syntax (AND, OR, NOT, prefix, phrase), `limit` as max hits, and `format` with output differences (markdown vs json, plus the metadata caveat). This is far more than the schema provides.

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 description opens with a precise verb+resource: 'Full-text search over pages already fetched into the local SQLite FTS5 index.' It immediately distinguishes itself from siblings by explicitly naming `search`/`research` as the alternatives for discovering new pages, making the tool's scope unambiguous.

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?

The description has a 'Best for' section listing concrete use cases (recalling fetched content, avoiding re-fetches, keyword grep) and a 'Not recommended for' section that names alternatives (`search`/`research`) and even covers the empty-cache case. This is explicit routing with no inference needed.

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