Skip to main content
Glama

indexing_get_metadata

Obtain the timestamps of URL_UPDATED and URL_DELETED notifications for a URL from Google Search Console to monitor indexing status.

Instructions

Get the latest indexing notification metadata for a URL. Returns the latest URL_UPDATED and URL_DELETED notification timestamps.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe fully-qualified URL to check notification status for

Implementation Reference

  • Main handler that registers the tool via server.tool() and makes a GET request to the Google Indexing API at /urlNotifications/metadata?url=... to retrieve latest notification timestamps for a URL.
    // ── indexing_get_metadata ──
    server.tool(
      "indexing_get_metadata",
      "Get the latest indexing notification metadata for a URL. Returns the latest URL_UPDATED and URL_DELETED notification timestamps.",
      {
        url: z
          .string()
          .describe("The fully-qualified URL to check notification status for"),
      },
      async ({ url }) => {
        try {
          const result = await apiCall(
            `${INDEXING_BASE}/urlNotifications/metadata?url=${encodeURIComponent(url)}`,
            { method: "GET" },
          );
          return toolResult(result);
        } catch (e) {
          return errorResult(e);
        }
      },
    );
  • Zod schema defining the single input parameter: 'url' (string) describing the URL to check notification status for.
    {
      url: z
        .string()
        .describe("The fully-qualified URL to check notification status for"),
    },
  • src/index.ts:563-583 (registration)
    Tool registration via server.tool() on the McpServer instance, registering it under the name 'indexing_get_metadata' with a description and schema.
    // ── indexing_get_metadata ──
    server.tool(
      "indexing_get_metadata",
      "Get the latest indexing notification metadata for a URL. Returns the latest URL_UPDATED and URL_DELETED notification timestamps.",
      {
        url: z
          .string()
          .describe("The fully-qualified URL to check notification status for"),
      },
      async ({ url }) => {
        try {
          const result = await apiCall(
            `${INDEXING_BASE}/urlNotifications/metadata?url=${encodeURIComponent(url)}`,
            { method: "GET" },
          );
          return toolResult(result);
        } catch (e) {
          return errorResult(e);
        }
      },
    );
  • src/index.ts:886-890 (registration)
    Sandbox/stub registration in the createSandboxServer() function, returning a placeholder 'sandbox' response.
    sandbox.tool("indexing_get_metadata", "Get the latest indexing notification metadata for a URL.", {
      url: z.string().describe("The fully-qualified URL to check notification status for"),
    }, async () => {
      return { content: [{ type: "text" as const, text: "sandbox" }] };
    });
  • Helper function that performs the actual HTTP fetch call with an OAuth2 access token, used by the tool handler to call the Indexing API.
    async function apiCall(
      url: string,
      options: RequestInit = {},
    ): Promise<{ ok: boolean; status: number; body: string }> {
      const token = await getAccessToken();
      const headers: Record<string, string> = {
        Authorization: `Bearer ${token}`,
        ...((options.headers as Record<string, string>) || {}),
      };
    
      const res = await fetch(url, { ...options, headers });
      const body = await res.text();
      return { ok: res.ok, status: res.status, body };
    }
Behavior2/5

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

With no annotations, the description should disclose behavioral traits. It fails to mention that this is a read-only operation, any authentication requirements, rate limits, or error behavior (e.g., what happens if the URL is not found). Only the return value is described.

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 extremely concise, consisting of two short sentences that front-load the core purpose and return value. Every sentence provides essential information without redundancy.

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 tool's simplicity (one parameter, no nested objects) and the clear schema coverage, the description is adequate. It could benefit from mentioning the response structure or typical use cases, but it is largely complete for this straightforward operation.

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 is fully described (100% coverage) for the single parameter 'url'. The schema description already explains it as a fully-qualified URL. The tool description adds no further semantic detail beyond that.

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 tool's purpose: retrieving latest indexing notification metadata for a URL. It specifies the returned data (URL_UPDATED and URL_DELETED timestamps), distinguishing it from sibling tools like indexing_publish which handle submissions.

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 does not explicitly state when to use this tool versus alternatives like url_inspection_inspect or search_analytics_query. No guidance on prerequisites or exclusions is provided, though the use case is implied.

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/mikusnuz/gsc-mcp'

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