glass_diff
Detect visual changes by comparing current pixels against a saved baseline; returns change stats and bounding box.
Instructions
Compare current pixels with a named baseline; returns change stats and bbox. A single comparison does not establish transition completion or quiescence. Use glass_wait_for_region to wait; include_image:true returns the changed crop only when pixels differ.
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": {
"name": "<name>"
},
"name": "glass_diff"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | `"perceptual"` (default) or `"exact"`. | |
| name | Yes | Saved baseline name; unsaved names error. | |
| ignore | No | Window-relative excluded rects intersected with region. changed_pct uses remaining pixels; ignored_pixels reports the excluded count. | |
| region | No | Window-relative comparison area; omit for whole window. Returned bbox is region-relative. | |
| max_width | No | Maximum returned image width; shrinks after crop, preserving native comparison pixels. | |
| threshold | No | Perceptual sensitivity for `mode="perceptual"`, 0..1 (default 0.1; smaller = stricter). | |
| tolerance | No | Per-channel tolerance for `mode="exact"` (default 0). | |
| max_height | No | Maximum returned image height; omit both limits for native output. | |
| include_image | No | Also return the current frame cropped to the changed region (default false). No image is returned when nothing changed. |