adb_screenshot_diff
Compare current Android screen against a saved baseline screenshot, reporting pixel difference count, percentage, and changed region. Tolerance threshold absorbs minor dynamic elements like clocks or badges.
Instructions
Compare the current screen against a saved screenshot baseline. Decodes PNGs and performs pixel-level comparison (RGB channels), reporting exact pixel difference count, percentage, and the bounding box of the changed region. Supports a tolerance threshold for absorbing minor dynamic elements like clocks or notification badges.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| baseline | Yes | Baseline name to compare against (from adb_screenshot_baseline) | |
| tolerancePercent | No | Pixel difference percentage threshold below which the result reports IDENTICAL. 0 = exact match required. 1-2 absorbs clock/status bar changes. | |
| device | No | Device serial | |
| result_handle | No | Optional. If provided, store this tool's result under `result://<tool>/<name>` for retrieval after compaction. Name must be 1-32 chars, [a-zA-Z0-9_-]. Existing handles with the same tool+name are overwritten. Use adb_result_list to see active handles, adb_result_get or the MCP Resource URI to retrieve. | |
| result_handle_ttl | No | Optional. TTL in seconds for the result handle (60 to 604800). Default 43200 (12 hours). Ignored if result_handle is not provided. |