Skip to main content
Glama

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
NameRequiredDescriptionDefault
siteUrlYesThe site URL
sitemapIndexNoOptional: URL of a sitemap index to list only sitemaps in that index

Implementation Reference

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

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