figma_compare
Render a Figma node and diff it against a reference PNG to find changed regions, report bounding boxes and clusters, and write a heatmap for review.
Instructions
Render a node and diff it against a PNG on disk — a mockup, an earlier export, or another node exported with figma_download_assets. Reports the differing area, its bounding box in the reference's own pixels (top-left origin, so a box can be cropped straight out of that PNG) and the largest clusters, and writes a heatmap. Anti-aliasing is absorbed by tolerance; a size mismatch is reported, never hidden. Read-only: the document is not touched.
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": {
"nodeId": "<nodeId>",
"reference": "<reference>"
},
"name": "figma_compare"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scale | No | Export scale for the render. Comparison is pixel-for-pixel, so a 2x mockup needs scale: 2 | |
| inline | No | Also return the heatmap as an image | |
| nodeId | Yes | The node to render now | |
| fileKey | No | Which connected Figma file to use: its fileKey (figma_whoami) or, when omitted, the only connected file. Required once more than one file is connected; figma_ping lists them. | |
| outPath | No | Where to write the heatmap PNG; defaults to <reference>-diff.png | |
| reference | Yes | Path to the PNG to compare against | |
| tolerance | No | Per-channel difference that still counts as equal, 0..64 of 255. Two renders of the same node need a few counts (anti-aliasing, font hinting); a real edit is usually far above |