sandbox_shot
Screenshot the virtual display, its front window, a URL, or a tab already open in a browser on the box (returned inline and as a download URL valid for one hour), or start/stop an mp4 recording of the display or of one tab. capturedAt in the result is when the picture was taken; path is a copy on the box (under /work/.sbx/shots) to sandbox_pull. With target url or tab, pageErrors lists what the page itself reported: console errors, uncaught exceptions and failed requests (an unresolved host, a 404), so a page stuck loading shows why. While a person is on the box's screen, the result carries takeover: true. To check a page you are signed in to at phone size yourself, start Chromium with --remote-debugging-port=9222 and use target tab with width, height and mobile: the box holds that viewport until reset. That viewport is for checking the page; the person tries a page through sandbox_review open web. Some chat clients show the inline image only to the model: url is a plain link the person can open. Each screenshot is also kept for the person in their app, with the box's other steps, for 30 days, and each recording for 7 days; sandbox_media lists them across all of the account's boxes.
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": {
"id": "<id>"
},
"name": "sandbox_shot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| tab | No | With target tab: which tab, by its id or a piece of its URL or title. Default: the tab whose viewport is held, else the most recently used one. The result's tab says which was captured | |
| url | No | Required when target is url, unless you pass urls | |
| port | No | With target tab: the browser's debugging port, needed only when several browsers on the box have one | |
| urls | No | With target url: capture several pages in one call. Pages of the same size share one browser, so a set costs about what one costs. They are written to /work/.sbx/shots and the result lists each path, because a batch of images does not fit in a tool result; fetch the ones you want with sandbox_get | |
| reset | No | With target tab: drop the held viewport, so the tab goes back to its window's size | |
| width | No | With target url: the viewport width in CSS pixels, default the box's screen width (1280 landscape, 390 portrait); the page lays out at exactly this width, even below Chromium's 500 px window minimum. With target tab: give that tab a viewport this wide and keep it until reset, the tab closes or the browser exits, so a phone layout holds while you keep working in it (Emulation.setDeviceMetricsOverride from your own CDP script is undone when its connection closes). Each call with width, height, deviceScaleFactor or mobile replaces the whole emulated viewport; one tab is held at a time | |
| height | No | With target url or tab: the viewport height, default the box's screen height for url (800 landscape, 844 portrait) and the window's own height for tab. fullPage captures however tall the page is | |
| mobile | No | With target url or tab: emulate a phone, with touch: mouse input then acts as a finger, so nothing hovers. A page without <meta name=viewport> lays out 980 px wide, as on a real phone | |
| record | No | mp4; omit for a screenshot. start records the whole display (target screen, the default), or with target tab just that page in a browser on the box: the video is the tab's viewport times deviceScaleFactor, with no browser bar and nothing around the page (width 360, height 640, deviceScaleFactor 3 and mobile make a sharp 1080x1920 phone video, the same viewport the tab's screenshots then keep). tab, port, width, height, deviceScaleFactor and mobile work as for a tab screenshot; the viewport cannot change until stop | |
| target | No | screen (default); window (just the front window, without the desktop or the app's own menu bar; the result's window is x,y,width,height on the screen, so add x and y to image coordinates before clicking; a window larger than the screen is cut to the part on it; windows lists every window on the screen with its id, name, position and pid, to check that none of yours is left before you finish); url (a fresh, signed-out headless Chromium); or tab: a page already open in a browser on the box, still signed in, which needs that browser started with --remote-debugging-port=9222 (Electron takes the same flag). tab does not scroll or move the pointer, so hover states stay in the picture | |
| waitFor | No | With target url or tab: capture once this CSS selector matches a visible element, or, prefixed with js:, once this JavaScript expression is truthy (it may await). Waits up to 30 s; if it never holds you still get the screenshot, with waitFor.met false. target tab also waits up to 45 s for a browser that is still starting, so no sleep is needed after launching one | |
| fullPage | No | With target url or tab: capture the whole page, not just the viewport, so a long article needs no guessed window height and no cropping | |
| stableMs | No | With target screen or window: capture once the picture has not changed for this long, so a page transition or an animation is not caught half way. Gives up after 20 s and returns the last frame with stable.settled false | |
| deviceScaleFactor | No | With target url or tab: device pixel ratio, e.g. 3 for an iPhone; the image is that many times the viewport |