Skip to main content
Glama

searchCache

Read-only

Search previously fetched documents in the local cache by regex pattern. Returns matching page URLs, paths, and match counts to check if content was already retrieved or locate cached pages mentioning a term.

Instructions

Greps the local cache of already-fetched documents — "did we already fetch X", "which cached pages mention Y". Call searchCache{pattern:"transformer attention"}. Returns WHICH cached pages match (url, md_path, match count, sample line), not their text — read md_path or fetch the url for content. Empty matches = nothing held matches (the web is not searched; search or fetch first); a tool error = the pattern was invalid or the cache could not be read.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patternYesRegex pattern to search across every cached markdown body in the cache.
ignore_caseNoCase-insensitive search.
max_resultsNoMaximum number of matching cached pages to return.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only provide readOnlyHint=true, but the description adds substantial behavior: returns which cached pages match rather than their text, lists the return fields, and explains the difference between empty matches and tool errors. This aligns with and extends the read-only annotation.

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 dense sentences cover target, output shape, empty-result semantics, and error semantics with no wasted words. The core distinction — local cache vs web search — is front-loaded.

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?

As a read-only tool with no output schema, the description is complete: it specifies the return shape, how to access full content, how to interpret empty results, and what causes errors. An agent has everything required to invoke it correctly.

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%, so the schema already fully documents pattern, ignore_case, and max_results. The description adds a call example for pattern but does not need to compensate for any missing parameter documentation.

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 states a specific verb and resource: 'Greps the local cache of already-fetched documents', and gives two concrete questions the tool answers. It clearly distinguishes itself from siblings by emphasizing 'local cache' and explicitly noting 'the web is not searched'.

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 explicitly tells the agent when to use it ('did we already fetch X') and when not to rely on it ('the web is not searched; search or fetch first'). Empty matches are given a defined meaning, so the agent knows to fall back to another tool rather than treating it as an error.

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

Deploy Server

Other Tools