Skip to main content
Glama

doc.crawl

Crawl a site from a starting URL, save each page as a searchable document, and run regex, text, or CSS selector rules to find content across pages.

Instructions

Point at a starting page and explore outward, saving each page as a searchable document. Follows links breadth-first to max_depth, staying inside scope (same-origin by default) and honouring include/exclude regexes. find rules match regex, text or CSS selectors on every page and are stored with the results, so this doubles as "search a whole site for X". Every page is scrolled before extraction. Pages already saved are reused rather than re-fetched unless refresh:true. Each saved page is stored as it is visited, so a run cut short (client timeout or cancel) keeps everything it reached - doc.crawls shows it; progress notifications are sent per page when the client asks.

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": {
      "url": "<url>"
    },
    "name": "doc.crawl"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesWhere to start. Must be absolute.
findNoRegex / text / selector rules to run on every page.
saveNoDefault true. Set false to explore and match without storing documents.
scopeNoDefault "same-origin". "path-prefix" keeps to the starting URL's directory, which is how you crawl /docs without the marketing site. "any" leaves the site - pair it with include.
formatNoDefault "markdown": keeps headings, code fences, tables and link targets, which is what makes a saved API reference still readable. "text" is flat visible text.
scrollNoDefault true: sweep the page until scrollHeight stops growing, so lazy-loaded and reveal-on-scroll sections are actually in the DOM before extraction. Turn off only for a page you know renders in full immediately.
excludeNoNever follow URLs matching these. Checked before include.
includeNoOnly follow URLs matching one of these regexes.
refreshNoRe-capture pages already in the library instead of reusing them.
delay_msNoPause between pages. Use it on someone else's server.
selectorNoCapture only this element instead of letting main_only pick one.
main_onlyNoDefault true: capture the <main>/<article> content and drop nav, sidebar and footer. Set false if the page has no content landmark and comes back short.
max_depthNoLink hops from the start page. 0 is that page alone; default 1, max 10.
max_linksNoCap on links collected per page (default 500).
max_pagesNoHard cap on pages visited (default 25, max 500). The crawl reports what was still queued.
settle_msNoExtra wait after scrolling, before extracting.
target_idNoTarget handle (tgt_*). Omit for the active page.
browser_idNoBrowser handle (br_*). Omit to use the only running browser, or auto-launch one.
click_moreNoAlso click "Load more" / "Show all" buttons between sweeps. Off by default because it is a real interaction, not just a scroll.
collectionNoName for this batch, e.g. "react-docs". Makes doc.search scoping easy afterwards.
timeout_msNo
wait_untilNo
scroll_passesNoCap on sweeps (default 12, max 60). Raise for a long infinite-scroll list.
page_timeout_msNoHard deadline per page (default 60000). A page that misses it is recorded as an error, its tab is reset, and the crawl moves on.
scroll_pause_msNoWait after each sweep for content to load (default 250).
stop_after_matchesNoStop the crawl once this many find-hits have accumulated.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only say readOnlyHint=false and openWorldHint=true; the description adds substantial behavior beyond that: pages are persisted as visited so a cancelled run keeps partial results, already-saved pages are reused unless refresh:true, every page is scrolled before extraction, per-page progress notifications are sent, and a page that misses page_timeout_ms is recorded as an error and the crawl continues. That is exactly the operational context an agent needs before launching a long, stateful, open-world job.

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?

Purpose is front-loaded in the first clause and each following sentence carries distinct information (scope, find rules, scrolling, reuse, resumability). It is a single dense block rather than a structured list, which makes it slightly harder to scan for a 26-parameter tool, but there is no filler.

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 26-parameter, open-world, mutating crawl with no output schema, the description covers the risky and non-obvious parts: persistence semantics, resumption after cancel, page-level timeouts, and where to inspect results (doc.crawls). The remaining gap is that two parameters (timeout_ms, wait_until) are undocumented in both schema and description, and the shape of the returned crawl summary is only pointed at indirectly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 92%, so the baseline is 3, but the description adds genuine meaning: path-prefix is explained as directory-scoped crawling, "any" is flagged as leaving the site and paired with include, and collection is tied to later doc.search scoping. Only timeout_ms and wait_until are left without any prose anywhere, which keeps it from a 5.

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?

Opens with a concrete verb+resource+scope: "Point at a starting page and explore outward, saving each page as a searchable document." It also distinguishes itself from siblings by naming doc.crawls (for inspecting runs) and doc.search (scoping via collection), so an agent can place it in the family 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 real selection guidance: use find rules when you want to "search a whole site for X", use path-prefix to crawl /docs without the marketing site, and set save:false to explore without storing. It stops short of an explicit exclusion (e.g. "for a single page use doc.save"), so it is strong context rather than a full when/when-not map.

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