Compare FigCraft Design and Web UI
compare_ui_screenshotsCompare two same-size PNG screenshots to measure pixel differences, generate a red difference heatmap, and report threshold pass/fail status.
Instructions
Compare two same-size PNG screenshots and optionally write a visible red difference heatmap. Reports percentage of differing pixels, mean absolute error, changed bounding box and threshold pass/fail; not semantic UX analysis.
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": {
"reference": "<reference>",
"actual": "<actual>"
},
"name": "compare_ui_screenshots"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| actual | Yes | Path to actual browser PNG capture. | |
| diffPath | No | Optional output path for a difference heatmap PNG. | |
| overwrite | No | Replace existing diffPath only when explicitly true. | |
| reference | Yes | Path to FigCraft PNG frame export or source screenshot. | |
| threshold | No | Per-channel max pixel difference to consider changed; default 20. | |
| maxChangedPercent | No | Acceptable changed pixel percentage, default 2%. |