capture_screenshot
Take screenshots of webpages or the current page with a real browser; set viewport, full-page, selector, and delay options, then return the saved image path.
Instructions
Capture a screenshot of a webpage or current page. Returns path to saved screenshot.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | URL to navigate to (optional if page already loaded) | |
| width | No | Viewport width in pixels (default: 1280) | |
| format | No | Image format (default: png) | |
| height | No | Viewport height in pixels (default: 720) | |
| delayMs | No | Sleep this many ms after load, before capture (intro animations) | |
| quality | No | JPEG quality 0-100 (only for jpeg format) | |
| scrollY | No | Scroll the page to this vertical offset in px before capture | |
| timeout | No | Navigation timeout in ms (default: 30000). On timeout the page is captured as rendered so far. | |
| filename | No | File name inside ./screenshots (ignored when outputPath is set) | |
| fullPage | No | Capture full page (default: visible viewport) | |
| selector | No | CSS selector for specific element to screenshot | |
| waitUntil | No | Navigation wait condition (default: load) | |
| outputPath | No | Full file path for the image (default: ./screenshots/screenshot-<ts>.<format>) | |
| hideSelectors | No | CSS selectors to hide before capture (cookie banners, chat widgets) | |
| waitForSelector | No | Wait for this CSS selector to appear before capture | |
| scrollToSelector | No | Scroll this element into view (top aligned) before capture | |
| deviceScaleFactor | No | Device pixel ratio, e.g. 2 for retina captures (default: 1) |