url_inspection_inspect
Check Google Search Console indexing status for a URL. View crawl details, rich results, AMP status, and mobile usability to verify 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
| Name | Required | Description | Default |
|---|---|---|---|
| inspectionUrl | Yes | The fully-qualified URL to inspect (must be under the site) | |
| siteUrl | Yes | The site URL (property) the inspected URL belongs to | |
| languageCode | No | Optional BCP-47 language code for localized results (e.g. 'en-US', 'ko') |
Implementation Reference
- src/index.ts:512-530 (handler)The handler logic for the 'url_inspection_inspect' tool, which performs an API call to inspect a URL.
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); } }, ); - src/index.ts:493-530 (registration)Registration of the 'url_inspection_inspect' tool using server.tool.
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); } }, );