Skip to main content
Glama
ahonn

Google Search Console MCP Server

by ahonn

get_sitemap

Retrieve sitemap data from Google Search Console to analyze website structure and improve search engine visibility.

Instructions

Get a sitemap for a site in Google Search Console

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
feedpathNoThe URL of the actual sitemap. For example: http://www.example.com/sitemap.xml
siteUrlNoThe site's URL, including protocol. For example: http://www.example.com/

Implementation Reference

  • Main handler for the 'get_sitemap' MCP tool: parses arguments using GetSitemapSchema, constructs requestBody, calls SearchConsoleService.getSitemap, formats and returns the API response as text content.
    case 'get_sitemap': {
      const args = GetSitemapSchema.parse(request.params.arguments);
      const requestBody = {
        siteUrl: args.siteUrl,
        feedpath: args.feedpath,
      };
      const response = await searchConsole.getSitemap(requestBody);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(response.data, null, 2),
          },
        ],
      };
    }
  • Zod schema defining input parameters for get_sitemap: siteUrl and feedpath (both optional strings with descriptions).
    export const GetSitemapSchema = z.object({
      feedpath: z
        .string()
        .optional()
        .describe('The URL of the actual sitemap. For example: http://www.example.com/sitemap.xml'),
      siteUrl: z
        .string()
        .optional()
        .describe("The site's URL, including protocol. For example: http://www.example.com/"),
    });
  • src/index.ts:73-77 (registration)
    Registration of the 'get_sitemap' tool in the ListToolsRequestHandler: specifies name, description, and converts GetSitemapSchema to JSON schema for input.
    {
      name: 'get_sitemap',
      description: 'Get a sitemap for a site in Google Search Console',
      inputSchema: zodToJsonSchema(GetSitemapSchema),
    },
  • Helper method in SearchConsoleService that performs the actual Google Webmasters API call to webmasters.sitemaps.get, with permission error handling and URL normalization fallback.
    async getSitemap(requestBody: GetSitemapRequest) {
      const webmasters = await this.getWebmasters();
      return this.handlePermissionError(
        () => webmasters.sitemaps.get(requestBody),
        () =>
          webmasters.sitemaps.get({
            ...requestBody,
            siteUrl: this.normalizeUrl(requestBody.siteUrl!),
          }),
      );
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states what the tool does but fails to mention critical aspects like whether this is a read-only operation, if it requires authentication, rate limits, error handling, or what the output format looks like. This leaves significant gaps for an agent to understand how to interact with it safely and 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, direct sentence that efficiently conveys the core purpose without any unnecessary words. It is front-loaded and wastes no space, making it easy for an agent to parse quickly.

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 interacting with Google Search Console (which likely involves authentication and specific data structures), the description is insufficient. With no annotations, no output schema, and minimal behavioral context, it doesn't provide enough information for an agent to use this tool confidently in a real-world scenario.

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%, with clear descriptions for both parameters ('feedpath' and 'siteUrl'), including examples. The description adds no additional parameter semantics beyond what the schema already provides, so it meets the baseline score of 3 for adequate but not enhanced coverage.

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 action ('Get') and resource ('a sitemap for a site in Google Search Console'), making the purpose immediately understandable. However, it doesn't distinguish this tool from sibling tools like 'list_sitemaps' or 'index_inspect', which might offer related functionality, 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 like 'list_sitemaps' or 'submit_sitemap'. It lacks context about prerequisites, such as whether the site must be verified in Google Search Console, or any exclusions for usage scenarios.

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