Skip to main content
Glama

indexnow_generate_key

Generate an API key and verification file for submitting URLs to search engines via IndexNow. Host the file at your domain root to enable instant indexing.

Instructions

Generate an IndexNow API key and the verification file content. You need to host this file at your domain root.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
custom_keyNoCustom API key (optional — a UUID will be generated if not provided)

Implementation Reference

  • The handler for indexnow_generate_key which generates a UUID (or uses custom_key), generates the file content, and formats the output instructions.
    async ({ custom_key }) => {
      const key = custom_key || crypto.randomUUID();
      const fileContent = generateApiKeyFile(key);
    
      let output = `## IndexNow API Key Generated\n\n`;
      output += `**Your API Key:** \`${key}\`\n\n`;
      output += `### Setup Instructions\n\n`;
      output += `1. Create a file named \`${key}.txt\` in your website's root directory\n`;
      output += `2. The file should contain only: \`${fileContent}\`\n`;
      output += `3. Verify it's accessible at: \`https://yourdomain.com/${key}.txt\`\n\n`;
      output += `### File Content\n\`\`\`\n${fileContent}\n\`\`\`\n\n`;
      output += `### Quick Setup Commands\n\`\`\`bash\n`;
      output += `# For static sites\necho "${key}" > public/${key}.txt\n\n`;
      output += `# For Next.js\necho "${key}" > public/${key}.txt\n\n`;
      output += `# For WordPress\necho "${key}" > ${key}.txt\n`;
      output += `# Upload to your WordPress root directory\n\`\`\`\n\n`;
      output += `### Supported Search Engines\n`;
      output += `- **Bing** (bing.com)\n`;
      output += `- **Yandex** (yandex.com)\n`;
      output += `- **Naver** (naver.com)\n`;
  • src/index.ts:387-413 (registration)
    Registration of the indexnow_generate_key tool.
    // Tool: Generate IndexNow API key and verification file
    server.tool(
      "indexnow_generate_key",
      "Generate an IndexNow API key and the verification file content. You need to host this file at your domain root.",
      {
        custom_key: z.string().optional().describe("Custom API key (optional — a UUID will be generated if not provided)"),
      },
      async ({ custom_key }) => {
        const key = custom_key || crypto.randomUUID();
        const fileContent = generateApiKeyFile(key);
    
        let output = `## IndexNow API Key Generated\n\n`;
        output += `**Your API Key:** \`${key}\`\n\n`;
        output += `### Setup Instructions\n\n`;
        output += `1. Create a file named \`${key}.txt\` in your website's root directory\n`;
        output += `2. The file should contain only: \`${fileContent}\`\n`;
        output += `3. Verify it's accessible at: \`https://yourdomain.com/${key}.txt\`\n\n`;
        output += `### File Content\n\`\`\`\n${fileContent}\n\`\`\`\n\n`;
        output += `### Quick Setup Commands\n\`\`\`bash\n`;
        output += `# For static sites\necho "${key}" > public/${key}.txt\n\n`;
        output += `# For Next.js\necho "${key}" > public/${key}.txt\n\n`;
        output += `# For WordPress\necho "${key}" > ${key}.txt\n`;
        output += `# Upload to your WordPress root directory\n\`\`\`\n\n`;
        output += `### Supported Search Engines\n`;
        output += `- **Bing** (bing.com)\n`;
        output += `- **Yandex** (yandex.com)\n`;
        output += `- **Naver** (naver.com)\n`;
  • Helper function to generate the API key file content.
    function generateApiKeyFile(apiKey: string): string {
      return apiKey;
    }
Behavior3/5

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

With no annotations provided, the description must carry the full behavioral burden. It adds crucial context about hosting the verification file at the domain root, but omits idempotency characteristics, side effects, or the structure of returned data given the missing output schema.

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 consists of two efficient sentences with zero wasted words. The first sentence front-loads the core purpose, while the second provides critical usage guidance without verbosity or unnecessary elaboration.

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

Completeness4/5

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

For a simple single-parameter tool without an output schema, the description adequately covers the generation purpose and hosting requirements. It could improve by briefly characterizing the return format (e.g., specifying that both key and file content are returned) since no output schema documents this.

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?

The input schema has 100% description coverage for the custom_key parameter, documenting its optional nature and UUID fallback. Since the schema fully describes the parameter, the description appropriately does not need to add redundant parameter details, meeting the baseline expectation.

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?

The description states 'Generate an IndexNow API key and the verification file content,' providing a specific verb (Generate) and clear resources. It effectively distinguishes from siblings like indexnow_submit and google_indexing_submit, which perform URL submission rather than key generation setup.

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

Usage Guidelines4/5

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

The description includes essential post-invocation guidance: 'You need to host this file at your domain root.' However, it lacks explicit when-to-use guidance comparing it to alternatives or stating prerequisites such as 'use this before submitting URLs via indexnow_submit.'

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