previewshot
Renders a headless screenshot of a session's built preview so
galleries can show a real thumbnail. Kept separate from web /
browser so thumbnail work can run in its own worker pool without
blocking the daemon hot path.
Internal module — not granted to agents by default. The daemon uses it itself to make project thumbnails; a builder-assistant does not normally call it. To capture a real image for a template preview, an agent renders the file with its own shell (
soffice/pdftoppm, headless Chrome) — see Templates → Producing a real image preview. This tool'skind(html/embed) andformat(jpeg/png) are its own — unrelated to a template'spreview_pathextension, toui.workspace.render_mode, or tousePreviewAttach().kind. See Which "preview" is which?.
| Property | Value |
|---|---|
| Module id | previewshot |
| Tool | screenshot |
Tool
previewshot.screenshot
| Param | Notes |
|---|---|
url | Required. Preview URL to capture. |
kind | html (default), pdf, or embed. |
settle_ms | Optional wait after load. |
format | jpeg (default) or png. |
page | PDF page (1-based); ignored for html/embed. |
Returns image bytes (typically as a data URL) for the caller to store or display.
Related
- Live inspect / drive of the preview pane:
preview - HTTP serve path for built assets: the session preview surface