Capture responsive screenshots
screenshot.captureRenders HTML files or URLs in a sandboxed Chromium browser, saving PNG screenshots to a specified directory for visual validation.
Instructions
Renders a local HTML file or HTTP(S) URL in a sandboxed local Chromium browser and writes PNG screenshots to the requested directory. Downloads the pinned headless browser on first use if it is not already cached. Existing matching files may be replaced.
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": {
"targetPath": "<targetPath>"
},
"name": "screenshot.capture"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| outputDir | No | Directory where PNG screenshots will be written. | .mcp-validator/screenshots |
| viewports | No | Optional viewport definitions; defaults to desktop, tablet, and mobile sizes. | |
| targetPath | Yes | Local HTML path or HTTP(S) URL to render. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| screenshots | Yes | ||
| outputDirectory | Yes |