sitemaps_get
Retrieve detailed information about a specific sitemap from Google Search Console to analyze its structure and status.
Instructions
Retrieve information about a specific sitemap.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| siteUrl | Yes | The site URL | |
| feedpath | Yes | The URL of the sitemap (e.g. 'https://example.com/sitemap.xml') |
Implementation Reference
- src/index.ts:272-292 (handler)Implementation of the sitemaps_get tool in src/index.ts. It uses the apiCall helper to fetch sitemap data from the Google Search Console API.
server.tool( "sitemaps_get", "Retrieve information about a specific sitemap.", { siteUrl: z.string().describe("The site URL"), feedpath: z .string() .describe("The URL of the sitemap (e.g. 'https://example.com/sitemap.xml')"), }, async ({ siteUrl, feedpath }) => { try { const result = await apiCall( `${WEBMASTERS_BASE}/sites/${encodeSiteUrl(siteUrl)}/sitemaps/${encodeURIComponent(feedpath)}`, { method: "GET" }, ); return toolResult(result); } catch (e) { return errorResult(e); } }, );