Skip to main content
Glama

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
NameRequiredDescriptionDefault
siteUrlYesThe site URL
feedpathYesThe URL of the sitemap to delete

Implementation Reference

  • 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);
        }
      },
    );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mikusnuz/gsc-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server