scrape_docs
Index documentation from a library URL to create a searchable version for a new library or release; enable replace to rebuild an existing version when needed.
Instructions
Scrape and index documentation from a URL for a library. Use this tool to index a new library or a new version. Scraping a library version that already exists is rejected unless replace is true; use refresh_version to update an existing version in place.
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>",
"library": "<library>"
},
"name": "scrape_docs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Documentation root URL to scrape. | |
| scope | No | Crawling boundary: 'subpages', 'hostname', or 'domain'. | subpages |
| library | Yes | Library name. | |
| replace | No | Rebuild the version from scratch if it already exists. Without it, an existing version is left untouched and the request fails. | |
| version | No | Library version (optional). | |
| maxDepth | No | Maximum navigation depth (default: 3). | |
| maxPages | No | Maximum number of pages to scrape (default: 1000). | |
| preserveHashes | No | Preserve hash fragments for hash-routed SPA documentation sites. | |
| excludePatterns | No | Patterns for excluding URLs during scraping. Pass one or more patterns as a comma-separated string or as an array. Commas inside { }, [ ] or ( ) are preserved; escape a literal comma with a backslash. Exclude takes precedence over include. Regex patterns must be wrapped in slashes, e.g. /pattern/. | |
| followRedirects | No | Follow HTTP redirects (3xx responses). | |
| includePatterns | No | Patterns for including URLs during scraping. Pass one or more patterns as a comma-separated string or as an array. Commas inside { }, [ ] or ( ) are preserved; escape a literal comma with a backslash. Regex patterns must be wrapped in slashes, e.g. /pattern/. If not set, all are included by default. |