Skip to main content

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's kind (html/pdf/embed) and format (jpeg/png) are its own — unrelated to a template's preview_path extension, to ui.workspace.render_mode, or to usePreviewAttach().kind. See Which "preview" is which?.

PropertyValue
Module idpreviewshot
Toolscreenshot

Tool​

previewshot.screenshot​

ParamNotes
urlRequired. Preview URL to capture.
kindhtml (default), pdf, or embed.
settle_msOptional wait after load.
formatjpeg (default) or png.
pagePDF page (1-based); ignored for html/embed.

Returns image bytes (typically as a data URL) for the caller to store or display.

  • Live inspect / drive of the preview pane: preview
  • HTTP serve path for built assets: the session preview surface