Skip to main content
The get_screenshot tool renders the canvas iframe to an image and returns it as a base64-encoded data URL. This gives your agent true visual access to the design — not just the DOM tree or computed styles, but the actual rendered pixels. Use screenshots to verify layout changes, check that colors match a reference, detect overflow, or pass the image to a vision-capable model for detailed feedback. By default, the screenshot is captured at 1x device pixel ratio in PNG format. Use scale: 2 to capture a high-DPI image with sharper text and crisp edges, and format: "jpeg" to reduce payload size when exact color fidelity is less important.

Parameters

number
Device pixel ratio for the captured image. Accepts 1 (default, standard resolution) or 2 (high-DPI, 2× resolution). Use 2 when passing the screenshot to a vision model or inspecting fine typographic detail.
string
Output image format. Accepts "png" (default, lossless) or "jpeg" (lossy, smaller file size). Use "jpeg" when bandwidth or context window size is a concern and pixel-perfect accuracy is not required.
string
Scope the screenshot to a single artboard rather than the full canvas viewport. Obtain artboard IDs from list_artboards.

Response

string
required
A base64-encoded data URL in the format data:image/png;base64,... or data:image/jpeg;base64,.... Pass this directly to a vision model or decode it to write the bytes to disk.
number
required
Width of the captured image in pixels, accounting for scale. A 1440px canvas at scale: 2 returns width: 2880.
number
required
Height of the captured image in pixels, accounting for scale.

Example

response
Screenshots of large canvases at scale: 2 produce large base64 strings. If your model has a context window or image size limit, prefer scale: 1 or format: "jpeg" for routine checks, and scale: 2 only when fine detail is critical.
When using a multi-step agent loop (read → change → verify), call get_screenshot after each write operation to visually confirm the result before proceeding to the next change.