Skip to main content
Glama

fetch_sitemap

Read-onlyIdempotent

Fetch a sitemap.xml or sitemap index and extract listed URLs with metadata like lastmod, changefreq, and priority. Handles nested sitemap indexes, gzipped files, and partial failures without aborting the request.

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. Partial failures (one child sitemap 500s while others work) are returned under 'warnings' without aborting the whole request. SSRF-protected by default.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesSitemap URL (sitemap.xml, sitemap.xml.gz, or a sitemap index)
max_urlsNoCap on total URLs returned (default 5000)
max_bytesNoMax bytes to read per sitemap response (default 20MiB)
max_depthNoHow many sitemap-index levels to follow (default 1). 0 keeps the top-level index flat and only returns its childSitemaps list.
timeout_msNo
user_agentNo
max_redirectsNo
allow_private_hostsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already indicate read-only, idempotent, non-destructive behavior. The description adds significant behavioral detail beyond that: sitemap-index chaining up to max_depth, gzip auto-decompression, partial failures returned under 'warnings' without aborting, and SSRF protection. These are valuable edge-case disclosures not present in annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is four sentences, front-loaded with the core purpose and followed by concise behavioral notes. Every sentence adds value—chaining, gzip, partial failures, SSRF protection—with no filler or repetition of schema details.

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?

Despite having no output schema, the description does indicate return content (URLs with metadata) and mentions a 'warnings' field for partial failures. It covers main behaviors and error handling, but omits details on complete-failure responses, default values for undocumented parameters, and pagination behavior. Still, for a read-only tool with 8 parameters, it is reasonably complete.

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 description coverage is 50% (4 of 8 parameters described). The description itself does not elaborate on parameters; it only references max_depth indirectly via chaining. It adds no new meaning for timeout, user_agent, max_redirects, or allow_private_hosts, which remain undocumented in both schema and description. This falls at the baseline for mid-coverage.

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?

The description states a specific verb ('Fetch') and resource ('sitemap.xml or sitemap-index') and clearly distinguishes the tool from siblings like fetch_robots or fetch_feed. It also details what it returns (URLs with lastmod/changefreq/priority), making the purpose unambiguous.

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?

The purpose is so specific that an agent can infer when to use it (whenever a sitemap is needed), and the description mentions partial failures and SSRF protection, which convey reliability context. However, it does not explicitly contrast with alternatives or state when not to use it, so it lacks exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.