web_get_page_screenshot
Web pages read low risk
Part of the CRO Audit Agent.
What it does
Return a FULL-PAGE screenshot of a landing page as an image Claude can look at, replacing the manual browser-extension screenshot in the CRO workflow. The picture is Lighthouse's render after page load in an emulated mobile (default) or desktop viewport, taken from the same PageSpeed Insights run web_get_pagespeed_report uses (lighthouseResult.fullPageScreenshot) — instant when that report already ran for the same url and strategy (one analysis, cached 15 minutes); otherwise the same in_progress rule applies: call again in ~20 s. The response is mixed content: a JSON envelope {url, final_url, strategy, analysis_utc, width, height, mime, source, bytes, page_height, slice_height, slices_total, slices_returned} followed by the page as VIEWPORT-HEIGHT SLICES, top to bottom, at most 6 images per call (one 9,000 px image is unreadable); pass part='7-12' for the next slices. If Lighthouse only produced the viewport screenshot the envelope says so; if no screenshot came back the tool returns not_available and asks for a manual upload — it never invents a picture. Not pixel-identical to a real browser: cookie banners, personalisation and lazy-loaded sections may differ, so describe what IS visible and flag what might be missing.
When to use it
Use in every CRO audit (see cro_collect_brief) to SEE the landing page — above-the-fold hierarchy, CTA prominence, visual trust cues, clutter — and whenever the user asks what a page looks like. Run mobile first, then desktop.
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
url | string | yes | Full landing page URL exactly as a visitor opens it (https://...). Public pages only. |
strategy | string | no | mobile (default) or desktop — the emulated device Lighthouse uses. Run both for a CRO audit; mobile is where most paid traffic lands. |
part | string | no | Which slices to return: a number ('3') or a range ('7-12'), at most 6 per call. Default: slices 1-6 (the top of the page). |
Safeguards
Policy
Read-only; public pages only; the image is returned to the requesting session and not stored. Describe only what is visible in the image; never claim to have seen a section that is cut off, blank or covered by a banner.
Reminder
The screenshot shows one emulated device after load; check both strategies when layout matters, and pair it with web_fetch_landing_page for the exact wording of headlines, CTAs and forms.
Errors
| Error class | Means | What to do | Retry |
|---|---|---|---|
rate_limited | PageSpeed Insights refused the request (quota). | If the server has neither a Google identity (ADC) nor SCALIX_PAGESPEED_API_KEY it used the anonymous quota, which is shared with the whole internet and usually exhausted — give it one; otherwise wait a minute and retry, and raise the PageSpeed Insights quota on the Scalix project if it persists. | yes |
invalid_argument | PageSpeed Insights could not analyse the URL, or strategy is not mobile/desktop. | Check that the URL is public, returns an HTML page and is not behind a login or bot protection; pass strategy=mobile or desktop. | no |
not_configured | PageSpeed Insights rejected the credential (API key, the server's Google identity, or an anonymous request). | Enable the PageSpeed Insights API (pagespeedonline.googleapis.com) on the Scalix project and grant the server identity serviceusage.serviceUsageConsumer (locally: gcloud auth application-default set-quota-project); with a key, check SCALIX_PAGESPEED_API_KEY. The error names the project. | no |
in_progress | Google is still analysing the page (Lighthouse takes 15-120 s, up to about five minutes when its first run fails and Scalix retries it; one tool call waits 45 s). | Call the same tool again with the same url and strategy in about 20 s — the analysis keeps running on the server and its answer is kept 15 minutes. Never write NOT VERIFIED because of in_progress. | yes |
platform_unavailable | Google's analysis failed: twice in a row with a server error (Scalix retried it once automatically; the message quotes Lighthouse's reason, e.g. PAGE_HUNG), no answer within its 150 s ceiling, or the API was unreachable. | After the double server error (is_retryable false), do not call again: write this PageSpeed evidence NOT VERIFIED with the message; PAGE_HUNG or NO_FCP is a finding about the page itself, and the message's pagespeed.web.dev link lets a person check by hand. After a timeout or an unreachable API (is_retryable true), call once more. | yes |
not_available | PageSpeed Insights returned no screenshot for this URL. | Retry once (Lighthouse occasionally omits it); if still missing, capture the page manually and upload the image. | yes |
Edge cases
- Very long pages are captured up to Lighthouse's 16,383 px limit; the tool warns when the capture hit it.
- Each call returns at most 6 slices; the warning names the part='n-m' to call for the rest. Slices are cut at the emulated viewport height so each one reads like one screen.
- Cookie banners and interstitials are captured as rendered; a banner covering the hero is itself a CRO finding.
- The image is several hundred KB; call once per strategy, not repeatedly.
- data.analysis says whether this answer came from the cached run (from_cache) and how long Google took (analysis_time_s).
- source says 'viewport only' when the full-page capture was absent — do not describe below-the-fold content in that case.