sitemaps_list
Retrieve all submitted sitemaps for a Google Search Console site to monitor indexing status and manage website structure.
Instructions
List all sitemaps submitted for a site in Google Search Console.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| siteUrl | Yes | The site URL | |
| sitemapIndex | No | Optional: URL of a sitemap index to list only sitemaps in that index |
Implementation Reference
- src/index.ts:245-269 (handler)The handler for the sitemaps_list tool, which constructs the API request to Google Search Console and returns the result.
server.tool( "sitemaps_list", "List all sitemaps submitted for a site in Google Search Console.", { siteUrl: z.string().describe("The site URL"), sitemapIndex: z .string() .optional() .describe( "Optional: URL of a sitemap index to list only sitemaps in that index", ), }, async ({ siteUrl, sitemapIndex }) => { try { let url = `${WEBMASTERS_BASE}/sites/${encodeSiteUrl(siteUrl)}/sitemaps`; if (sitemapIndex) { url += `?sitemapIndex=${encodeURIComponent(sitemapIndex)}`; } const result = await apiCall(url, { method: "GET" }); return toolResult(result); } catch (e) { return errorResult(e); } }, );