fetch_sitemap
Fetch and parse sitemap.xml or sitemap indexes to return contained URLs with lastmod, changefreq, and priority, including gzipped files and partial-failure warnings.
Instructions
Fetch a sitemap.xml (or sitemap-index) and return the contained URLs with their lastmod / changefreq / priority. Follows sitemap-index chaining up to max_depth levels. Gzipped .xml.gz payloads are auto-decompressed. A single sitemap document over 16 MiB once decoded is refused (a 50,000-URL sitemap is ~11 MiB). Partial failures (one child sitemap 500s while others work) are returned under 'warnings' without aborting the whole request. SSRF-protected by default.
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": "fetch_sitemap"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Sitemap URL (sitemap.xml, sitemap.xml.gz, or a sitemap index) | |
| max_urls | No | Cap on total URLs returned (default 5000) | |
| max_bytes | No | Max bytes to read per sitemap response (default 20MiB) | |
| max_depth | No | How many sitemap-index levels to follow (default 1). 0 keeps the top-level index flat and only returns its childSitemaps list. | |
| timeout_ms | No | ||
| user_agent | No | ||
| max_sitemaps | No | Cap on sitemap documents fetched -- the index plus every child (default 50, max 1000). Children past the cap are listed under childSitemaps, unfetched. | |
| max_redirects | No | ||
| allow_private_hosts | No | Allow loopback / private / link-local targets for this call (default false). Refused unless the server operator launched fetch-mcp with FETCH_MCP_ALLOW_PRIVATE_HOSTS=1 -- SSRF protection stays on by default either way. |