Skip to main content
Glama

google_indexing_submit

Submit URLs to Google Indexing API for fast crawling and indexing. Use to notify Google about new, updated, or deleted web pages.

Instructions

Submit URLs to Google Indexing API for fast crawling and indexing. Requires a Google service account access token with Indexing API permissions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlsYesList of URLs to submit
access_tokenYesGoogle OAuth2 access token with Indexing API scope
typeNoNotification type: URL_UPDATED (new/changed) or URL_DELETED (removed). Default: URL_UPDATED

Implementation Reference

  • The submitToGoogleIndexing helper function executes the actual POST request to the Google Indexing API.
    async function submitToGoogleIndexing(
      urls: string[],
      accessToken: string,
      type: "URL_UPDATED" | "URL_DELETED" = "URL_UPDATED"
    ): Promise<GoogleIndexResult[]> {
      const results: GoogleIndexResult[] = [];
    
      for (const url of urls) {
        try {
          const response = await fetch(GOOGLE_INDEXING_API_URL, {
            method: "POST",
            headers: {
              "Content-Type": "application/json",
              Authorization: `Bearer ${accessToken}`,
            },
            body: JSON.stringify({
              url,
              type,
            }),
            signal: AbortSignal.timeout(15000),
          });
    
          const data = await response.json();
    
          results.push({
            url,
            success: response.status >= 200 && response.status < 300,
            status: response.status,
            message: response.ok
              ? `Submitted (${type})`
              : data.error?.message || `HTTP ${response.status}`,
          });
        } catch (error) {
          results.push({
            url,
            success: false,
            status: 0,
            message: error instanceof Error ? error.message : "Unknown error",
          });
        }
  • src/index.ts:251-276 (registration)
    Registration of the google_indexing_submit tool using server.tool.
    // Tool: Submit to Google Indexing API
    server.tool(
      "google_indexing_submit",
      "Submit URLs to Google Indexing API for fast crawling and indexing. Requires a Google service account access token with Indexing API permissions.",
      {
        urls: z.array(z.string().url()).describe("List of URLs to submit"),
        access_token: z.string().describe("Google OAuth2 access token with Indexing API scope"),
        type: z
          .enum(["URL_UPDATED", "URL_DELETED"])
          .optional()
          .describe("Notification type: URL_UPDATED (new/changed) or URL_DELETED (removed). Default: URL_UPDATED"),
      },
      async ({ urls, access_token, type }) => {
        const results = await submitToGoogleIndexing(urls, access_token, type || "URL_UPDATED");
        const successful = results.filter((r) => r.success).length;
    
        let output = `## Google Indexing API Results\n\n`;
        output += `**URLs submitted:** ${urls.length}\n`;
        output += `**Successful:** ${successful}/${urls.length}\n`;
        output += `**Type:** ${type || "URL_UPDATED"}\n\n`;
    
        output += `| URL | Status | Result |\n|-----|--------|--------|\n`;
        for (const r of results) {
          const shortUrl = r.url.length > 60 ? r.url.substring(0, 57) + "..." : r.url;
          output += `| ${shortUrl} | ${r.status} | ${r.message} |\n`;
        }
  • Input schema validation for google_indexing_submit.
    {
      urls: z.array(z.string().url()).describe("List of URLs to submit"),
      access_token: z.string().describe("Google OAuth2 access token with Indexing API scope"),
      type: z
        .enum(["URL_UPDATED", "URL_DELETED"])
        .optional()
        .describe("Notification type: URL_UPDATED (new/changed) or URL_DELETED (removed). Default: URL_UPDATED"),
    },
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 discloses the auth requirement and the outcome (fast crawling/indexing), but omits other behavioral traits such as API rate limits, quota restrictions, idempotency characteristics, or what constitutes a successful response.

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 exactly two high-value sentences: one declaring purpose and effect, the second stating the hard requirement. There is no redundancy or extraneous information, and the critical constraint (service account auth) is prominently featured.

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?

Given the simple 3-parameter schema with 100% coverage and no output schema, the description is appropriately complete regarding inputs and side effects. However, it could be improved by briefly noting the return value or success indicators since no output schema exists to document the response.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

While the schema has 100% coverage, the description adds crucial semantic specificity by clarifying that a 'service account' access token is required (not just any OAuth2 token), which is technically significant for the Google Indexing API. This compensates for the schema's more general 'OAuth2 access token' description.

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 clearly states the specific action (Submit URLs), the target resource (Google Indexing API), and the benefit (fast crawling and indexing). It naturally distinguishes itself from the IndexNow siblings (indexnow_submit) by specifying 'Google Indexing API' and from google_indexing_status by using the verb 'Submit' versus checking status.

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 explicitly states the authentication prerequisite ('Requires a Google service account access token'), which defines when the tool can be used. However, it does not explicitly contrast with indexnow_submit to clarify when to use Google's API versus IndexNow, though the naming makes this relatively clear.

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