Skip to main content
Glama
ahonn

Google Search Console MCP Server

by ahonn

list_sitemaps

Retrieve and display all sitemaps for a website from Google Search Console to monitor and manage site structure for search engine optimization.

Instructions

List sitemaps for a site in Google Search Console

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sitemapIndexNoA URL of a site's sitemap index. For example: http://www.example.com/sitemapindex.xml
siteUrlNoThe site's URL, including protocol. For example: http://www.example.com/

Implementation Reference

  • MCP tool handler for 'list_sitemaps': parses arguments using schema, constructs request body, calls SearchConsoleService.listSitemaps, and formats response as JSON text content.
    case 'list_sitemaps': {
      const args = ListSitemapsSchema.parse(request.params.arguments);
      const requestBody = {
        siteUrl: args.siteUrl,
        sitemapIndex: args.sitemapIndex,
      };
      const response = await searchConsole.listSitemaps(requestBody);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(response.data, null, 2),
          },
        ],
      };
    }
  • Zod input schema for the list_sitemaps tool, defining optional siteUrl and sitemapIndex parameters with descriptions.
    export const ListSitemapsSchema = z.object({
      sitemapIndex: z
        .string()
        .optional()
        .describe(
          "A URL of a site's sitemap index. For example: http://www.example.com/sitemapindex.xml",
        ),
      siteUrl: z
        .string()
        .optional()
        .describe("The site's URL, including protocol. For example: http://www.example.com/"),
    });
  • src/index.ts:68-72 (registration)
    Tool registration in ListTools response, specifying name, description, and input schema reference.
    {
      name: 'list_sitemaps',
      description: 'List sitemaps for a site in Google Search Console',
      inputSchema: zodToJsonSchema(ListSitemapsSchema),
    },
  • SearchConsoleService method implementing listSitemaps API call to Google Webmasters sitemaps.list with permission error fallback using URL normalization.
    async listSitemaps(requestBody: ListSitemapsRequest) {
      const webmasters = await this.getWebmasters();
      return this.handlePermissionError(
        () => webmasters.sitemaps.list(requestBody),
        () =>
          webmasters.sitemaps.list({
            ...requestBody,
            siteUrl: this.normalizeUrl(requestBody.siteUrl!),
          }),
      );
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('List sitemaps') but doesn't describe key behaviors such as whether this is a read-only operation, what the output format looks like, if there are pagination or rate limits, or any authentication requirements. This leaves significant gaps for an agent to understand how to handle the tool effectively.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence that directly states the tool's purpose without any unnecessary words. It is front-loaded and efficient, making it easy for an agent to parse quickly. Every part of the description earns its place by conveying essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a tool with 2 parameters, no annotations, and no output schema, the description is incomplete. It doesn't address behavioral aspects like output format, error handling, or usage context, which are crucial for an agent to invoke the tool correctly. The description alone is insufficient for full understanding without additional structured data.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, meaning the input schema already documents both parameters ('sitemapIndex' and 'siteUrl') with descriptions and examples. The description adds no additional meaning or context about these parameters beyond what's in the schema, so it meets the baseline score of 3 without compensating for any gaps.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('List') and resource ('sitemaps for a site in Google Search Console'), making the purpose immediately understandable. However, it doesn't differentiate this tool from sibling tools like 'get_sitemap' or 'submit_sitemap', which also deal with sitemaps in the same domain, so it doesn't reach the highest score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. For example, it doesn't explain how 'list_sitemaps' differs from 'get_sitemap' (which might retrieve a specific sitemap) or when to use it over other sibling tools like 'list_sites'. There's no mention of prerequisites or context for usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/ahonn/mcp-server-gsc'

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