compare_screenshot
Detect visual regressions by comparing the current page screenshot against a saved baseline, returning pixel diff percentage. Use update_baseline to save a new baseline.
Instructions
Compare the current page screenshot against a saved baseline. On first run (or with update_baseline=true) saves the baseline. Returns the pixel diff percentage. Install Pillow for accurate pixel comparison.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "compare_screenshot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Baseline name e.g. 'homepage' | default |
| threshold | No | Max allowed diff % before failure | |
| update_baseline | No |