Skip to main content
Glama
Figma Local Bridge

Figma Local Bridge

by Miart

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

NameRequiredDescriptionDefault
scaleNoExport scale for the render. Comparison is pixel-for-pixel, so a 2x mockup needs scale: 2
inlineNoAlso return the heatmap as an image
nodeIdYesThe node to render now
fileKeyNoWhich 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.
outPathNoWhere to write the heatmap PNG; defaults to <reference>-diff.png
referenceYesPath to the PNG to compare against
toleranceNoPer-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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.36.0

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are supplied, so the description carries the full burden and does well: it discloses the disk side effect (writes a heatmap PNG), the tolerance's role in absorbing anti-aliasing, that size mismatches are reported rather than hidden, and that the document itself is untouched. It leaves out failure behavior (missing node, unreadable reference, render errors) and any cost or timeout expectations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the operation, then outputs, then the tolerance caveat, then the read-only guarantee — a sensible order with no filler sentences. The em-dash parentheticals make it dense and slightly harder to scan than it needs to be.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With seven parameters and no output schema, the description correctly takes on the burden of describing return content (differing area, bounding box, largest clusters, heatmap artifact). That covers the essentials, though failure modes and the inline-heatmap return path are left implicit.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning by explaining that comparison is against the reference's own pixel grid (relevant to choosing scale) and that bounding boxes are croppable from that PNG. It says nothing about `inline` or `outPath` beyond what the schema already states.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Render a node and diff it against a PNG on disk" states a concrete verb pair and resource, and the reference sources (mockup, earlier export, or output of figma_download_assets) pin down exactly what class of operation this is. An agent can distinguish it from screenshot/export siblings without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description positions the tool against real workflows — comparing against a mockup, an earlier export, or another node produced by figma_download_assets — which is genuine when-to-use context. It stops short of explicit exclusions or a direct 'use X instead for Y' routing statement, so it is clear but not fully prescriptive.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.