Skip to main content
Glama

doc.search

Read-only

Search saved web pages at once using ranked full-text snippets or regex patterns; scope by site or collection to locate matching content.

Instructions

Search every saved page at once. Default mode is ranked full-text with snippets showing the match in context; terms are quoted and ANDed for you, so punctuation in a query is safe. mode:"regex" streams the stored text instead, for patterns full-text search cannot express (version numbers, identifiers, anything with wildcards). Scope with site or collection.

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": "doc.search"
  }
}

Input Schema

NameRequiredDescriptionDefault
rawNofts mode: pass the query through as FTS5 syntax, for OR / NEAR / prefix*.
modeNoDefault "fts" (ranked, with snippets).
siteNo
limitNo
queryYesWords to find, or a regex when mode is "regex".
doc_idNoregex mode: search inside one document.
collectionNo
ignore_caseNoregex mode.
context_linesNoregex mode: lines of context around each hit.
snippet_tokensNofts mode: snippet width in tokens (default 16).

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 only declare readOnly and openWorld; the description adds real behavior: terms are quoted and ANDed automatically, punctuation is safe, default results are ranked snippets with match context, and regex mode streams stored text rather than ranking. These are non-obvious traits an agent could not infer from annotations. Missing details like result limits or cost of streaming are minor.

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 core purpose and mode distinction, with no filler. The mode:"regex" formatting is slightly awkward but the information density is high and each sentence contributes.

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 10-parameter tool with no output schema, the description covers the two modes, result shape (snippets in context), and scoping, which is most of what an agent needs to call it correctly. Gaps remain around limit/pagination and the regex-only parameters, which rely on the schema alone.

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 70%, so the baseline is 3. The description usefully explains what mode controls, that raw-equivalent behavior is the default (quoted/ANDed terms), and that site and collection scope the search — the two scope params have no schema descriptions. However, limit is never explained and other params (doc_id, context_lines, snippet_tokens) are left entirely to the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb and resource plus scope: "Search every saved page at once." That distinguishes it from single-document tools like doc.get or doc.list, and the description also frames the two modes. It does not name sibling search tools (artifact.search, guide.search), so differentiation from other search surfaces is only partially addressed.

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 clear mode selection guidance: default is ranked full-text, and regex is for "patterns full-text search cannot express (version numbers, identifiers, anything with wildcards)" with concrete examples. It also says to scope with site or collection. It stops short of stating when not to use this tool versus sibling searches.

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