Skip to main content
Glama

sitemaps_submit

Submit sitemaps to Google Search Console for website indexing. This tool sends XML sitemap URLs to Google to help crawlers discover and index your site content.

Instructions

Submit a sitemap for a site to Google Search Console.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
siteUrlYesThe site URL
feedpathYesThe URL of the sitemap to submit (e.g. 'https://example.com/sitemap.xml')

Implementation Reference

  • The handler function for sitemaps_submit that calls the Google Search Console API.
    async ({ siteUrl, feedpath }) => {
      try {
        const result = await apiCall(
          `${WEBMASTERS_BASE}/sites/${encodeSiteUrl(siteUrl)}/sitemaps/${encodeURIComponent(feedpath)}`,
          { method: "PUT" },
        );
        return {
          content: [
            {
              type: "text" as const,
              text: result.ok
                ? `Sitemap "${feedpath}" submitted successfully.`
                : result.body,
            },
          ],
          isError: !result.ok,
        };
      } catch (e) {
  • The input schema validation for the sitemaps_submit tool using Zod.
    {
      siteUrl: z.string().describe("The site URL"),
      feedpath: z
        .string()
        .describe(
          "The URL of the sitemap to submit (e.g. 'https://example.com/sitemap.xml')",
        ),
    },
  • src/index.ts:295-306 (registration)
    The registration of the sitemaps_submit tool.
    server.tool(
      "sitemaps_submit",
      "Submit a sitemap for a site to Google Search Console.",
      {
        siteUrl: z.string().describe("The site URL"),
        feedpath: z
          .string()
          .describe(
            "The URL of the sitemap to submit (e.g. 'https://example.com/sitemap.xml')",
          ),
      },
      async ({ siteUrl, feedpath }) => {

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