Skip to main content
Glama

url_inspection_inspect

Inspect a URL in Google's index to check indexing status, crawl info, rich results, AMP status, and mobile usability. Identify issues affecting search visibility.

Instructions

Inspect a URL in Google's index. Returns indexing status, crawl info, rich results, AMP status, and mobile usability for a specific URL.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inspectionUrlYesThe fully-qualified URL to inspect (must be under the site)
siteUrlYesThe site URL (property) the inspected URL belongs to
languageCodeNoOptional BCP-47 language code for localized results (e.g. 'en-US', 'ko')

Implementation Reference

  • The async handler function that executes the tool logic: takes inspectionUrl, siteUrl, and optional languageCode; posts to the Google Search Console URL Inspection API endpoint; returns results via toolResult helper.
      async ({ inspectionUrl, siteUrl, languageCode }) => {
        try {
          const body: Record<string, string> = { inspectionUrl, siteUrl };
          if (languageCode) body.languageCode = languageCode;
    
          const result = await apiCall(
            `${INSPECTION_BASE}/urlInspection/index:inspect`,
            {
              method: "POST",
              headers: { "Content-Type": "application/json" },
              body: JSON.stringify(body),
            },
          );
          return toolResult(result);
        } catch (e) {
          return errorResult(e);
        }
      },
    );
  • Input schema definition: inspectionUrl (required string), siteUrl (required string), languageCode (optional string with BCP-47 format description).
    {
      inspectionUrl: z
        .string()
        .describe("The fully-qualified URL to inspect (must be under the site)"),
      siteUrl: z
        .string()
        .describe(
          "The site URL (property) the inspected URL belongs to",
        ),
      languageCode: z
        .string()
        .optional()
        .describe(
          "Optional BCP-47 language code for localized results (e.g. 'en-US', 'ko')",
        ),
    },
  • src/index.ts:493-530 (registration)
    Tool registration on the MCP server with name 'url_inspection_inspect' and description 'Inspect a URL in Google's index...'
    server.tool(
      "url_inspection_inspect",
      "Inspect a URL in Google's index. Returns indexing status, crawl info, rich results, AMP status, and mobile usability for a specific URL.",
      {
        inspectionUrl: z
          .string()
          .describe("The fully-qualified URL to inspect (must be under the site)"),
        siteUrl: z
          .string()
          .describe(
            "The site URL (property) the inspected URL belongs to",
          ),
        languageCode: z
          .string()
          .optional()
          .describe(
            "Optional BCP-47 language code for localized results (e.g. 'en-US', 'ko')",
          ),
      },
      async ({ inspectionUrl, siteUrl, languageCode }) => {
        try {
          const body: Record<string, string> = { inspectionUrl, siteUrl };
          if (languageCode) body.languageCode = languageCode;
    
          const result = await apiCall(
            `${INSPECTION_BASE}/urlInspection/index:inspect`,
            {
              method: "POST",
              headers: { "Content-Type": "application/json" },
              body: JSON.stringify(body),
            },
          );
          return toolResult(result);
        } catch (e) {
          return errorResult(e);
        }
      },
    );
  • toolResult helper: formats the API response as MCP content text, setting isError based on HTTP ok status.
    function toolResult(result: { ok: boolean; body: string }) {
      return {
        content: [{ type: "text" as const, text: result.body }],
        isError: !result.ok,
      };
    }
    
    function errorResult(e: unknown) {
      const message = e instanceof Error ? e.message : String(e);
      return {
        content: [{ type: "text" as const, text: `Error: ${message}` }],
        isError: true,
      };
    }
  • errorResult helper: catches exceptions and returns error content with isError: true.
    function errorResult(e: unknown) {
      const message = e instanceof Error ? e.message : String(e);
      return {
        content: [{ type: "text" as const, text: `Error: ${message}` }],
        isError: true,
      };
    }
Behavior3/5

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

No annotations provided, so description carries burden. It lists return types (indexing status, etc.) but does not disclose rate limits, auth needs, or that the URL must be under the site. No contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single-sentence description packs all needed info without fluff, though it could be slightly more structured (e.g., list results). Still very concise.

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?

No output schema exists, but the description adequately lists the types of results returned. The requirement that inspectionUrl is under siteUrl is in schema, but might help to mention in description. Overall complete for a read-only tool.

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?

Input schema has 100% coverage with descriptions for all parameters. The tool description adds no extra parameter meaning beyond summarizing the tool's output, so baseline 3 is appropriate.

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 uses a specific verb ('inspect') and resource ('URL in Google's index'), clearly distinguishing this from siblings like indexing_batch_publish or search_analytics_query.

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?

While no explicit when-not or alternatives are given, the description implies use for SEO diagnostics by listing the inspection results, and the context of sibling tools (e.g., publishing, sitemaps) helps differentiate.

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