Skip to main content
Glama

indexnow_submit_sitemap

Submit URLs from an XML sitemap to IndexNow for instant search engine indexing. This tool extracts URLs and sends them directly to search engines to accelerate content discovery.

Instructions

Fetch a sitemap XML, extract all URLs, and submit them to IndexNow for instant indexing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sitemap_urlYesURL of the XML sitemap to process
api_keyYesYour IndexNow API key
hostYesYour website hostname (e.g., example.com)
enginesNoSearch engines to submit to (default: all)
limitNoMax URLs to submit (default: all)

Implementation Reference

  • The handler function for the `indexnow_submit_sitemap` tool, which fetches a sitemap, parses it, and submits URLs to IndexNow.
    async ({ sitemap_url, api_key, host, engines, limit }) => {
      try {
        const response = await fetch(sitemap_url, {
          signal: AbortSignal.timeout(30000),
        });
    
        if (!response.ok) {
          return {
            content: [
              {
                type: "text" as const,
                text: `Error: Failed to fetch sitemap (HTTP ${response.status})`,
              },
            ],
          };
        }
    
        const xml = await response.text();
        let urls = parseSitemap(xml);
    
        if (urls.length === 0) {
          return {
            content: [
              {
                type: "text" as const,
                text: "Error: No URLs found in sitemap. Make sure it's a valid XML sitemap with <loc> tags.",
              },
            ],
          };
        }
    
        const totalFound = urls.length;
        if (limit && limit > 0) {
          urls = urls.slice(0, limit);
        }
        if (urls.length > 10000) {
          urls = urls.slice(0, 10000);
        }
    
        const results = await submitToIndexNow(urls, api_key, host, undefined, engines);
        const successful = results.filter((r) => r.success).length;
    
        let output = `## Sitemap IndexNow Submission\n\n`;
        output += `**Sitemap:** ${sitemap_url}\n`;
        output += `**URLs found:** ${totalFound}\n`;
        output += `**URLs submitted:** ${urls.length}\n`;
        output += `**Engines successful:** ${successful}/${results.length}\n\n`;
    
        output += `| Engine | Status | Result |\n|--------|--------|--------|\n`;
        for (const r of results) {
          output += `| ${r.engine} | ${r.status} | ${r.success ? "Success" : "Failed"} - ${r.message} |\n`;
        }
    
        return { content: [{ type: "text" as const, text: output }] };
  • src/index.ts:307-319 (registration)
    Tool registration for `indexnow_submit_sitemap` including its description and input schema.
    server.tool(
      "indexnow_submit_sitemap",
      "Fetch a sitemap XML, extract all URLs, and submit them to IndexNow for instant indexing.",
      {
        sitemap_url: z.string().url().describe("URL of the XML sitemap to process"),
        api_key: z.string().describe("Your IndexNow API key"),
        host: z.string().describe("Your website hostname (e.g., example.com)"),
        engines: z
          .array(z.enum(["bing", "yandex", "naver", "seznam", "indexnow"]))
          .optional()
          .describe("Search engines to submit to (default: all)"),
        limit: z.number().optional().describe("Max URLs to submit (default: all)"),
      },
Behavior3/5

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

With no annotations provided, the description carries the full burden. It describes the happy-path workflow but omits error handling behavior, rate limiting, what happens if the sitemap is unreachable, or what the tool returns (no output schema exists). It does set expectations with 'instant indexing'.

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?

Single, efficient sentence of 12 words. Immediately front-loaded with the core action and scope. No redundant or wasted language.

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

Completeness3/5

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

For a 5-parameter external API integration tool with no output schema and no annotations, the description covers the primary value proposition but leaves gaps. It should disclose what happens upon completion (success/failure indicators), handling of large sitemaps, or side effects of the IndexNow submission.

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%, establishing a baseline of 3. The description implies usage of sitemap_url, api_key, and host through the workflow narrative but does not add semantic details, constraints, or format guidance beyond what the schema already provides for the 'engines' and 'limit' parameters.

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

Purpose5/5

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

Description uses specific verbs (Fetch, extract, submit) and clearly identifies the resource (sitemap XML → IndexNow). The 'sitemap' specificity clearly distinguishes this from the sibling 'indexnow_submit' tool which presumably handles individual URLs.

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

Usage Guidelines3/5

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

The description implies usage through the workflow (fetch sitemap → submit URLs), but provides no explicit guidance on when to choose this over 'indexnow_submit' for individual URLs, or prerequisites like generating an API key first via 'indexnow_generate_key'.

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/sharozdawa/indexnow-mcp'

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