Plumb · verify
plumb_verifyCompares rendered UI elements against a Figma design and returns structured layout, style, text, and asset deltas, plus coverage and untagged-element feedback for iterative fixes.
Instructions
Compare what you built against the Figma design and return structured deltas — exact, deterministic, no pixel diff. After rendering, for every element you tagged data-plumb-id="<el>" (or the globally-unique data-plumb-id="<path>" for deeply nested DOM), collect:
• box — getBoundingClientRect() → { x, y, w, h }
• styles — a subset of getComputedStyle: backgroundColor, color, fontFamily, fontSize, fontWeight, lineHeight, padding{Top,Right,Bottom,Left}, gap, flexDirection, justifyContent, alignItems, borderRadius, borderColor, borderWidth, opacity, textDecorationLine, boxShadow, backdropFilter
• text — textContent for TEXT nodes
• asset — for image/icon/logo nodes (assetId or vector): the data-plumb-asset="" you rendered, plus img:true when it is a real / (not a redrawn div). Verify errors on a visual node rendered with no real asset, so a redrawn/omitted logo lowers the score.
Pass them as rendered. The tool joins by el (loose) or path (strict) and returns deltas like { kind:'size.w', expected:528, actual:530, severity:'warn' }. The response also includes coverage — how many PDS els in the subtree were actually tagged, plus an untagged list so you know what to add next round. QA-strict on appearance — colour (ΔE2000), icon/asset fidelity, box-shadow, backdrop-filter (glass) and the rest flag even small misses — but content-aware on text: a mismatch on placeholder/template copy (lorem, generic labels, numeric stubs, copy-pasted cells) is advisory info (kind 'text.placeholder', doesn't dent the score), since you're meant to swap real content in. Real UI labels still warn (kind 'text.chars'). ok=true means no errors; warns are differences you may have meant.
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": {
"rendered": "<rendered>"
},
"name": "plumb_verify"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Screen id. | |
| url | No | Paste a full Figma URL — fileKey and node-id are auto-extracted. | |
| name | No | Screen name (plugin path). | |
| depth | No | PDS depth to fetch. Default 12 — deep enough for most screens. | |
| fileKey | No | File key (REST path). | |
| rendered | Yes | Each element you tagged data-plumb-id="<el>". | |
| viewport | No | Browser viewport size (informational). | |
| tolerances | No | Override default thresholds. |