compareFigmaToElement
Compare a Figma design to a live browser element to identify visual differences. Uses file key, node ID, and CSS selector for pixel-perfect validation.
Instructions
Compare Figma design with browser element. Pixel-perfect validation.
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": {
"fileKey": "<fileKey>",
"nodeId": "<nodeId>",
"selector": "<selector>"
},
"name": "compareFigmaToElement"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodeId | Yes | Frame/component ID | |
| fileKey | Yes | File key | |
| selector | Yes | CSS selector | |
| threshold | No | Diff threshold (default: 0.05) | |
| figmaScale | No | Scale (default: 2) | |
| figmaToken | No | API token (optional) |