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
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Where to start. Must be absolute. | |
| find | No | Regex / text / selector rules to run on every page. | |
| save | No | Default true. Set false to explore and match without storing documents. | |
| scope | No | Default "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. | |
| format | No | Default "markdown": keeps headings, code fences, tables and link targets, which is what makes a saved API reference still readable. "text" is flat visible text. | |
| scroll | No | Default 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. | |
| exclude | No | Never follow URLs matching these. Checked before include. | |
| include | No | Only follow URLs matching one of these regexes. | |
| refresh | No | Re-capture pages already in the library instead of reusing them. | |
| delay_ms | No | Pause between pages. Use it on someone else's server. | |
| selector | No | Capture only this element instead of letting main_only pick one. | |
| main_only | No | Default 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_depth | No | Link hops from the start page. 0 is that page alone; default 1, max 10. | |
| max_links | No | Cap on links collected per page (default 500). | |
| max_pages | No | Hard cap on pages visited (default 25, max 500). The crawl reports what was still queued. | |
| settle_ms | No | Extra wait after scrolling, before extracting. | |
| target_id | No | Target handle (tgt_*). Omit for the active page. | |
| browser_id | No | Browser handle (br_*). Omit to use the only running browser, or auto-launch one. | |
| click_more | No | Also click "Load more" / "Show all" buttons between sweeps. Off by default because it is a real interaction, not just a scroll. | |
| collection | No | Name for this batch, e.g. "react-docs". Makes doc.search scoping easy afterwards. | |
| timeout_ms | No | ||
| wait_until | No | ||
| scroll_passes | No | Cap on sweeps (default 12, max 60). Raise for a long infinite-scroll list. | |
| page_timeout_ms | No | Hard 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_ms | No | Wait after each sweep for content to load (default 250). | |
| stop_after_matches | No | Stop the crawl once this many find-hits have accumulated. |