diff_screenshot
Compare a baseline PNG against another image or the live simulator screen to get the changed percentage and bounding box of change.
Instructions
Compare a baseline PNG with another PNG or with the current simulator screen. Returns the changed percentage and the bounding box of change.
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": {
"before_path": "<before_path>"
},
"name": "diff_screenshot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| threshold | No | Per-pixel channel delta that counts as changed (default: 12) | |
| after_path | No | Comparison PNG path; omit to capture the live simulator screen | |
| before_path | Yes | Baseline PNG path |