smart_diff
Compare before-and-after page states using pixel and DOM analysis to identify moved, resized, or restyled elements, then save baselines and run comparisons by viewport.
Instructions
Compare before/after with both pixel diff AND DOM analysis. Returns structured changes: which elements moved, resized, changed styles. Much more useful than pixel_diff alone. First call with action 'save_baseline', then make changes, then call with action 'compare'.
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": {
"action": "<action>"
},
"name": "smart_diff"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Page URL. Auto-detected if omitted. | |
| name | No | Baseline name. Default: auto-generated. | |
| action | Yes | save_baseline to save current state, compare to diff against saved baseline. | |
| selector | No | CSS selector to scope diff to a section. | |
| viewport | No | Viewport. Default: desktop. |