Take a screenshot of a screen
capture_screenshotTake a new screenshot of one screen and return it as an image; nothing on the screen changes.
When to use:
Checking what a screen shows, e.g. after set_screen_content or refresh_screens.
When NOT to use:
Learning why: use get_screen_status. Polling in a loop.
What to know:
Waits up to about 5 seconds; a slow or offline screen returns its last frame with fresh:false. A frame over 2 MB returns latestFrameUrl only. Needs screen.edit (it sends a device command).
Parameters:
screenId: one scr_… id from list_items kind screens; for several screens, call once each. An id outside this connection's reach reads as not found and nothing is sent.
kind and id: a stored picture of a layout, design, app, file, web link or old screenshot instead; no device is asked, so it needs only that item's view permission.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "capture_screenshot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | With kind: the item's id, from list_items of that kind (screenshots: list_items kind screenshots). | |
| kind | No | What to picture. Left out or screens: a new screenshot of screenId. Any other kind is a stored picture of content and nothing is sent to a device: a layout or design comes back as SVG text, an app as its latest snapshot, a file as its poster, a web link as its latest render, and a stored screenshot by its id. | |
| screenId | No | The screen to take a picture of. A screen id comes from list_items kind screens. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| svg | No | layouts and creatives: the picture as SVG markup. | |
| note | No | What happened, in plain language, including why a picture is not fresh. | |
| fresh | No | true when the picture was taken after this call; false when the device did not answer in time and the picture is the last one stored. | |
| picture | No | kind other than screens: true when a picture came back (as an image, or as svg). | |
| mimeType | No | kind other than screens: the picture's type, e.g. image/png or image/svg+xml. | |
| latestFrameAt | No | ISO 8601 time the picture was taken; null when the screen never sent one. | |
| latestFrameUrl | No | Link to the picture file. The same picture is also returned as an image. | |
| latestScreenshotId | No | Id of the stored picture. |