Skip to main content
Glama
ahonn

Google Search Console MCP Server

by ahonn

submit_sitemap

Submit a sitemap URL to Google Search Console to notify Google about your website's structure and content for improved indexing and search visibility.

Instructions

Submit a sitemap for a site in Google Search Console

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
feedpathYesThe URL of the sitemap to add. For example: http://www.example.com/sitemap.xml
siteUrlYesThe site's URL, including protocol. For example: http://www.example.com/

Implementation Reference

  • Zod input schema definition for the submit_sitemap tool, defining siteUrl and feedpath parameters.
    export const SubmitSitemapSchema = z.object({
      feedpath: z
        .string()
        .describe('The URL of the sitemap to add. For example: http://www.example.com/sitemap.xml'),
      siteUrl: z
        .string()
        .describe("The site's URL, including protocol. For example: http://www.example.com/"),
    });
  • src/index.ts:78-82 (registration)
    Registration of the submit_sitemap tool in the ListTools response, including name, description, and input schema reference.
    {
      name: 'submit_sitemap',
      description: 'Submit a sitemap for a site in Google Search Console',
      inputSchema: zodToJsonSchema(SubmitSitemapSchema),
    },
  • Main MCP tool handler for submit_sitemap: parses input with schema, constructs request body, delegates to SearchConsoleService.submitSitemap, and formats response.
    case 'submit_sitemap': {
      const args = SubmitSitemapSchema.parse(request.params.arguments);
      const requestBody = {
        siteUrl: args.siteUrl,
        feedpath: args.feedpath,
      };
      const response = await searchConsole.submitSitemap(requestBody);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(response.data, null, 2),
          },
        ],
      };
    }
  • Core implementation in SearchConsoleService: calls Google Webmasters API sitemaps.submit with permission error handling and URL normalization fallback.
    async submitSitemap(requestBody: SubmitSitemapRequest) {
      const webmasters = await this.getWebmasters();
      return this.handlePermissionError(
        () => webmasters.sitemaps.submit(requestBody),
        () =>
          webmasters.sitemaps.submit({
            ...requestBody,
            siteUrl: this.normalizeUrl(requestBody.siteUrl!),
          }),
      );
    }
  • Type alias for the SubmitSitemapRequest based on Google API types.
    type SubmitSitemapRequest = webmasters_v3.Params$Resource$Sitemaps$Submit;
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. 'Submit' implies a mutation/write operation, but it doesn't disclose behavioral traits such as required permissions, whether it's idempotent, error handling, or rate limits. This leaves significant gaps for a tool that likely modifies data.

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, efficient sentence that directly states the tool's purpose without any fluff or redundancy. It's appropriately sized and front-loaded, making it easy 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 a mutation tool with no annotations and no output schema, the description is incomplete. It lacks details on behavioral aspects like side effects, return values, or error conditions, which are crucial for safe and effective use in an AI agent context.

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%, so the input schema fully documents both parameters. The description doesn't add any meaning beyond what the schema provides, such as explaining relationships between parameters or additional constraints. Baseline 3 is appropriate when the schema handles the heavy lifting.

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 ('submit') and resource ('sitemap for a site in Google Search Console'), making the purpose immediately understandable. It doesn't explicitly distinguish from siblings like 'list_sitemaps' or 'get_sitemap', but the verb 'submit' implies a write operation versus their likely read operations.

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?

No guidance is provided on when to use this tool versus alternatives like 'list_sitemaps' or 'get_sitemap', nor are there any prerequisites or exclusions mentioned. The description only states what it does without context for selection.

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