compare_screenshots
Pixel-diff two screenshots to detect visual changes. Returns percentage of differing pixels and a diff image highlighting changed regions. Use for visual-regression testing.
Instructions
Pixel-diff two screenshot files. Returns the percentage of differing pixels and writes a diff image highlighting the changed regions (path in the result). Use for visual-regression checks — capture with test_url/screenshot_session, then compare. threshold sets per-channel color tolerance.
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": {
"screenshot1": "<screenshot1>",
"screenshot2": "<screenshot2>"
},
"name": "compare_screenshots"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| threshold | No | Color difference threshold 0-255 (default: 10) | |
| screenshot1 | Yes | Path to first screenshot | |
| screenshot2 | Yes | Path to second screenshot |