sitemaps_delete
Remove sitemaps from Google Search Console to manage website indexing and crawl efficiency.
Instructions
Delete a sitemap from Google Search Console.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| siteUrl | Yes | The site URL | |
| feedpath | Yes | The URL of the sitemap to delete |
Implementation Reference
- src/index.ts:330-358 (handler)The implementation of the 'sitemaps_delete' tool, which takes 'siteUrl' and 'feedpath' to perform a DELETE request against the Google Search Console API.
server.tool( "sitemaps_delete", "Delete a sitemap from Google Search Console.", { siteUrl: z.string().describe("The site URL"), feedpath: z.string().describe("The URL of the sitemap to delete"), }, async ({ siteUrl, feedpath }) => { try { const result = await apiCall( `${WEBMASTERS_BASE}/sites/${encodeSiteUrl(siteUrl)}/sitemaps/${encodeURIComponent(feedpath)}`, { method: "DELETE" }, ); return { content: [ { type: "text" as const, text: result.ok ? `Sitemap "${feedpath}" deleted successfully.` : result.body, }, ], isError: !result.ok, }; } catch (e) { return errorResult(e); } }, );