Compare two images
image_compareMeasure differences between two images using SSIM, RMSE, PSNR, pixel change metrics, and perceptual hash distance to verify image transformations or detect duplicates.
Instructions
Measure how different two images are: SSIM, RMSE, PSNR, mean and max pixel difference, the fraction of changed pixels, and perceptual-hash distance. Use it to verify a transform or to spot duplicate images.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "image_compare"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | URL for the first image. | |
| path | No | Path to the first image. | |
| align | No | Resize the second image to the first's dimensions before comparing. | |
| base64_data | No | Inline base64 for the first image. | |
| diff_amplify | No | Amplify the diff visually. | |
| compare_to_url | No | URL for the second image. | |
| compare_to_path | No | Path to the second image. | |
| change_threshold | No | Per-pixel difference counted as a change. | |
| compare_to_base64 | No | Inline base64 for the second image. | |
| create_diff_image | No | Also write a visual difference image (white where identical). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| input | No | Summary of the source image, when one was read. | |
| notes | No | ||
| steps | No | ||
| metrics | No | Operation-specific measurements (e.g. comparison scores). | |
| outputs | No | ||
| operation | Yes | Tool that produced this result. | |
| sizeChange | No | ||
| inlineImageIncluded | No | True when an image block accompanies this result for vision-capable clients. |