Screenshot
preview_screenshotA screenshot of a page of the project's running app (path, viewport desktop, mobile, tablet, wide or all, or width: any width in px, full_page). A path with a fragment ("/#rooms") shows that part of the page; full_page scrolls through first, so lazy pictures are in. viewport all returns phone, tablet and wide laptop side by side in one image: use it to see a layout at every width in one call. Returns the image and a link to it that works for an hour. Use it to see what you built; design_check also measures what to fix. Pages behind the app's own sign-in: sign in with http_request, then pass its session cookie as headers {"Cookie": "..."} (sent only to the app; the log keeps header names only). The page's own WebSockets reach the app (a dev server's live reload, a live view's updates); sockets to other sites are closed. It also lists the browser errors in that clean browser (no extensions): uncaught errors, console errors and the app's own failed requests (include_warnings adds console warnings), or says none; when the user reports an error from their own browser, look here first. When the page didn't answer 2xx (a missing page's 404, a 500), its first line says so. compare: true compares with the previous screenshot of the same page, viewport and env: how alike, which parts changed and which didn't (the header, each section, the footer); take one before a change and one with compare after it, since an edit that succeeded isn't proof it looks right. reference: an image under data/import of how it should look (the person's upload, a captured site's screenshot): how alike the page is and where it differs most.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"project": "<project>"
},
"name": "preview_screenshot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | preview | |
| path | No | / | |
| port | No | ||
| width | No | Any width in CSS px instead of viewport: 320 or 375 for a small phone, 844 for a phone held sideways, a width just either side of a breakpoint. Below 1025 it renders with touch, as a phone or tablet. | |
| compare | No | Compare with the previous screenshot of this page at this viewport and env: how alike, and which parts changed. | |
| headers | No | ||
| project | Yes | Project slug or id. | |
| viewport | No | desktop | |
| full_page | No | ||
| reference | No | An image under data/import of how the page should look (the person's upload, or a captured site's screenshots/…): how alike the page is to it and where it differs most. A tall image means a full page (full_page defaults to it). | |
| include_image | No | false: leave the image out of the result, keeping its link (for an app that prints results as text). | |
| include_warnings | No | Also list the page's console warnings (default: errors only). |