Skip to main content
Glama
ahonn

Google Search Console MCP Server

by ahonn

index_inspect

Check if a URL is indexed or can be indexed in Google Search Console to verify search visibility and identify indexing issues.

Instructions

Inspect a URL to see if it is indexed or can be indexed

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
siteUrlYesThe site URL as defined in Search Console. Example: sc-domain:example.com (for domain resources) or http://www.example.com/ (for site prefix resources)
inspectionUrlYesThe fully-qualified URL to inspect. Must be under the property specified in "siteUrl"
languageCodeNoAn IETF BCP-47 language code representing the language of the requested translated issue messages, such as "en-US" or "de-CH". Default is "en-US"en-US

Implementation Reference

  • Core handler function that executes the index inspection using the Google Search Console API's urlInspection.index.inspect method.
    async indexInspect(requestBody: IndexInspectRequest) { const searchConsole = await this.getSearchConsole(); return searchConsole.urlInspection.index.inspect({ requestBody }); }
  • Dispatch handler in the main tool request switch that parses arguments, prepares the request body, calls the core indexInspect function, and formats the response.
    case 'index_inspect': { const args = IndexInspectSchema.parse(request.params.arguments); const requestBody = { siteUrl: args.siteUrl, inspectionUrl: args.inspectionUrl, languageCode: args.languageCode, }; const response = await searchConsole.indexInspect(requestBody); return { content: [ { type: 'text', text: JSON.stringify(response.data, null, 2), }, ], };
  • Zod schema defining the input parameters for the index_inspect tool: siteUrl, inspectionUrl, and optional languageCode.
    export const IndexInspectSchema = GSCBaseSchema.extend({ inspectionUrl: z .string() .describe( 'The fully-qualified URL to inspect. Must be under the property specified in "siteUrl"', ), languageCode: z .string() .optional() .default('en-US') .describe( 'An IETF BCP-47 language code representing the language of the requested translated issue messages, such as "en-US" or "de-CH". Default is "en-US"', ), });
  • src/index.ts:63-67 (registration)
    Tool registration in the ListTools response, defining the name, description, and input schema for index_inspect.
    { name: 'index_inspect', description: 'Inspect a URL to see if it is indexed or can be indexed', inputSchema: zodToJsonSchema(IndexInspectSchema), },
  • Type definition for the IndexInspectRequest body used in the core handler, derived from Google API types.
    type IndexInspectRequest = searchconsole_v1.Params$Resource$Urlinspection$Index$Inspect['requestBody'];

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

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