gsc_indexing_issues
Check indexing status for multiple URLs and identify common issues like robots.txt blocks, crawl errors, or page-fetch failures.
Instructions
Bulk indexing check for multiple pages using the URL Inspection API.
Use this tool to quickly verify whether a batch of URLs is indexed by Google and
spot common issues (blocked by robots.txt, crawl errors, page-fetch failures, not
yet indexed). For each URL it returns a compact summary; to get the full
inspection payload (mobile usability, rich results, AMP) for a single page, use
gsc_inspect_url instead.
Quota note: the URL Inspection API enforces ~60 requests per minute and
~2000 per day per property. Keep the pages list reasonable in size.
Args:
site_url: Verified property URL. Domain property format "sc-domain:example.com"
or URL-prefix format "https://example.com/".
pages: List of fully qualified page URLs to check. They must belong to the
site_url property.
Returns:
JSON array, one entry per input URL, each with:
- url: the input URL
- verdict: one of PASS, PARTIAL, FAIL, NEUTRAL, VERDICT_UNSPECIFIED
- coverageState: human-readable coverage description
- robotsTxtState: e.g. ALLOWED / DISALLOWED
- indexingState: e.g. INDEXING_ALLOWED / BLOCKED_BY_META_TAG
- lastCrawlTime: ISO-8601 timestamp of Google's last crawl attempt
- pageFetchState: SUCCESSFUL / SOFT_404 / ACCESS_DENIED / etc.
- crawledAs: DESKTOP / MOBILE
If a single URL fails, its entry contains an error field instead of the
fields above; the rest of the batch still returns normally.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site_url | Yes | ||
| pages | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- The `gsc_indexing_issues` handler function, decorated with @mcp.tool(). It performs a bulk indexing check for multiple page URLs using the Google URL Inspection API, iterating over each page, calling the API, and returning a JSON array of results (verdict, coverageState, robotsTxtState, indexingState, lastCrawlTime, pageFetchState, crawledAs). Errors per URL are caught and reported in an 'error' field.
def gsc_indexing_issues(site_url: str, pages: list[str]) -> str: """Bulk indexing check for multiple pages using the URL Inspection API. Use this tool to quickly verify whether a batch of URLs is indexed by Google and spot common issues (blocked by robots.txt, crawl errors, page-fetch failures, not yet indexed). For each URL it returns a compact summary; to get the full inspection payload (mobile usability, rich results, AMP) for a single page, use `gsc_inspect_url` instead. Quota note: the URL Inspection API enforces ~60 requests per minute and ~2000 per day per property. Keep the `pages` list reasonable in size. Args: site_url: Verified property URL. Domain property format "sc-domain:example.com" or URL-prefix format "https://example.com/". pages: List of fully qualified page URLs to check. They must belong to the `site_url` property. Returns: JSON array, one entry per input URL, each with: - url: the input URL - verdict: one of PASS, PARTIAL, FAIL, NEUTRAL, VERDICT_UNSPECIFIED - coverageState: human-readable coverage description - robotsTxtState: e.g. ALLOWED / DISALLOWED - indexingState: e.g. INDEXING_ALLOWED / BLOCKED_BY_META_TAG - lastCrawlTime: ISO-8601 timestamp of Google's last crawl attempt - pageFetchState: SUCCESSFUL / SOFT_404 / ACCESS_DENIED / etc. - crawledAs: DESKTOP / MOBILE If a single URL fails, its entry contains an `error` field instead of the fields above; the rest of the batch still returns normally. """ results = [] for page in pages: try: data = _api_post( f"{INSPECT_BASE}/urlInspection/index:inspect", {"inspectionUrl": page, "siteUrl": site_url}, ) result = data.get("inspectionResult", {}) index_status = result.get("indexStatusResult", {}) results.append({ "url": page, "verdict": index_status.get("verdict", "UNKNOWN"), "coverageState": index_status.get("coverageState", ""), "robotsTxtState": index_status.get("robotsTxtState", ""), "indexingState": index_status.get("indexingState", ""), "lastCrawlTime": index_status.get("lastCrawlTime", ""), "pageFetchState": index_status.get("pageFetchState", ""), "crawledAs": index_status.get("crawledAs", ""), }) except Exception as e: results.append({"url": page, "error": str(e)}) return json.dumps(results, indent=2, ensure_ascii=False) - src/google_search_console_mcp/server.py:184-185 (registration)The @mcp.tool() decorator registers `gsc_indexing_issues` as an MCP tool with FastMCP.
@mcp.tool() def gsc_indexing_issues(site_url: str, pages: list[str]) -> str: - The function signature defines the input schema: `site_url: str` and `pages: list[str]`. The docstring documents the return schema (JSON array with fields: url, verdict, coverageState, robotsTxtState, indexingState, lastCrawlTime, pageFetchState, crawledAs, or error).
def gsc_indexing_issues(site_url: str, pages: list[str]) -> str: """Bulk indexing check for multiple pages using the URL Inspection API. Use this tool to quickly verify whether a batch of URLs is indexed by Google and spot common issues (blocked by robots.txt, crawl errors, page-fetch failures, not yet indexed). For each URL it returns a compact summary; to get the full inspection payload (mobile usability, rich results, AMP) for a single page, use `gsc_inspect_url` instead. Quota note: the URL Inspection API enforces ~60 requests per minute and ~2000 per day per property. Keep the `pages` list reasonable in size. Args: site_url: Verified property URL. Domain property format "sc-domain:example.com" or URL-prefix format "https://example.com/". pages: List of fully qualified page URLs to check. They must belong to the `site_url` property. Returns: JSON array, one entry per input URL, each with: - url: the input URL - verdict: one of PASS, PARTIAL, FAIL, NEUTRAL, VERDICT_UNSPECIFIED - coverageState: human-readable coverage description - robotsTxtState: e.g. ALLOWED / DISALLOWED - indexingState: e.g. INDEXING_ALLOWED / BLOCKED_BY_META_TAG - lastCrawlTime: ISO-8601 timestamp of Google's last crawl attempt - pageFetchState: SUCCESSFUL / SOFT_404 / ACCESS_DENIED / etc. - crawledAs: DESKTOP / MOBILE If a single URL fails, its entry contains an `error` field instead of the fields above; the rest of the batch still returns normally.