Capture Multi-Viewport Responsive Snapshots
ink_capture_viewportCapture desktop, vertical, and mobile viewport snapshots to verify layout integrity, responsiveness, and centering while detecting overflow.
Instructions
PURPOSE: Capture 3 high-resolution viewport snapshots (16:9 Desktop Landscape 1920x1080, 9:16 Vertical Story 1080x1920, and Mobile View 390x844) via headless Chromium to verify layout integrity, responsiveness, and optical centering.
BEHAVIOR: Launches local headless Chromium with an isolated temporary user-data profile. Renders the provided HTML string or URL, waits for network idle, and writes 3 PNG image files to the target outputDirectory (defaults to '.ink_snapshots/'). Detects horizontal scrollbar leaks and viewport overflow. Requires local Chromium/Chrome installed.
USAGE GUIDELINES:
When to use: Call after making HTML/CSS modifications or finishing a component to visually confirm that elements align properly across desktop, mobile, and tall vertical screens.
When NOT to use: Do NOT use for fast code syntax or contrast checks without browser rendering (use ink_validate_design instead).
Alternatives: Use ink_validate_design for fast static design linting; use ink_inspect_website_style to reverse-engineer design tokens from live URLs.
RETURNS: ResultEnvelope containing structured 'snapshots' list (with label, viewport, exact dimensions, file path, and size) and layout overflow metrics.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | No | Human-readable label used for image naming and output organization | Site Snapshot |
| htmlOrUrl | Yes | HTML markup string, local file path (e.g. 'file:///index.html'), or public HTTP/HTTPS URL to render and photograph | |
| outputDirectory | No | Target folder where 16:9, 9:16, and mobile PNG snapshots are written (defaults to '.ink_snapshots') |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Domain-specific typed payload returned by the tool | |
| status | Yes | Execution outcome status | |
| summary | Yes | Concise, human-readable executive summary of the tool outcome | |
| evidence | No | Audit trail, source references, and generated artifact locations | |
| warnings | Yes | Operational cautions, craft advice, or non-blocking warnings | |
| nextActions | No | Actionable sequential recommendations or subsequent tool suggestions |