Skip to main content
Glama

Parse sitemap

sitemap_parse
Read-only

Fetch one XML sitemap and return structured JSON for URLs or child sitemap indexes, so agents can inspect site structure without parsing raw XML.

Instructions

Free, read-only. Fetch one XML sitemap and return JSON. A urlset gives urls[] (loc, lastmod, changefreq, priority, plus image/news extensions), urlCount and truncated. A sitemap index gives type 'sitemapindex' and sitemaps[] with the child URLs; children are not fetched, call again per child. Uncompressed XML only, no .gz. Errors on non-2xx, 10 s timeout or private hosts.

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": "sitemap_parse"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYessitemap.xml or sitemap index URL, http(s), uncompressed.
maxUrlsNoDefault 100, max 1000; urlCount still reports the full total. Ignored for a sitemap index.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.5
    • changedInput schema / properties / maxUrls / description
      Previous value: -"Max 1000."New value: +"Default 100, max 1000; urlCount still reports the full total. Ignored for a sitemap index."
    • changedInput schema / properties / url / description
      Previous value: -"Sitemap URL."New value: +"sitemap.xml or sitemap index URL, http(s), uncompressed."
  2. Changed2 schema fields changedv0.1.1
    • changedInput schema / properties / maxUrls / description
      Previous value: -"Max URLs to return from a urlset (default 100, max 1000). Has no effect on sitemapindex (all child sitemaps are always returned)."New value: +"Max 1000."
    • changedInput schema / properties / url / description
      Previous value: -"Sitemap URL (http:// or https://). Accepts sitemap.xml, sitemap_index.xml, or any XML sitemap."New value: +"Sitemap URL."
  3. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Beyond readOnlyHint=true, it discloses the free/read-only nature, the exact failure modes (non-2xx, 10 s timeout, private hosts), the truncation flag, and that index children are not auto-fetched. That is a genuinely rich behavioral profile for a fetch tool.

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?

Four short sentences, each doing distinct work: purpose, urlset return shape, index return shape, and failure constraints. Scoping and the 'call again per child' caveat are front-loaded where an agent will see them.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description supplies the return contract for both response variants (urls[], urlCount, truncated, sitemaps[]), plus operational limits. An agent has everything needed to decide, call, and interpret results without further probing.

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 100%, so url format and maxUrls default/cap/full-count semantics are already documented in structured data. The description adds little parameter-specific information beyond reiterating the uncompressed-URL constraint, so baseline 3 applies.

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?

"Fetch one XML sitemap and return JSON" gives a precise verb, resource, input format and output format. The follow-up sentences distinguish the two sitemap shapes (urlset vs sitemapindex), which an agent could otherwise conflate with the sibling rss_parse or generic fetch tools.

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?

States clear boundaries: uncompressed XML only, no .gz, private hosts and non-2xx fail, and children of an index must be fetched with separate calls. It stops short of naming an alternative tool (e.g. rss_parse or fetch_extract) for non-sitemap feeds, so a sibling comparison is implied rather than explicit.

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