take_screenshot
Capture full-page or element-level screenshots of a webpage using your own Chrome or Edge via CDP, without Puppeteer or Playwright. Save pixel-perfect PNGs by URL, viewport, or CSS selector.
Instructions
Capture a pixel-perfect fullpage or element-level screenshot of a webpage using real Chrome/Edge CDP without Puppeteer/Playwright dependencies.
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": {
"url": "<url>",
"outputPath": "<outputPath>"
},
"name": "take_screenshot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dpr | No | Device scale factor. Set to 2 for Retina/HiDPI display (default: 1) | |
| url | Yes | Target webpage URL (e.g. http://localhost:3000 or https://example.com) | |
| delay | No | Additional delay in milliseconds after load to ensure animations/fonts finish (default: 1000) | |
| width | No | Viewport width in pixels (default: 1920) | |
| height | No | Viewport height in pixels (default: 1080) | |
| waitFor | No | Optional CSS selector to wait for before taking screenshot | |
| selector | No | Optional CSS selector to crop precisely to a specific DOM element (e.g. #header, .modal-card) | |
| outputPath | Yes | Path where the PNG screenshot should be saved (e.g. ./docs/screenshots/overview.png) |