figma_audit
Audits a Figma page or subtree read-only for design-system issues—duplicate keys, hardcoded styles, unstyled text, contrast failures, detached instances—and returns node-level findings.
Instructions
Read-only design-system audit of a page or subtree. Reports stable-key problems (duplicate keys, nodes added to a built tree without a key), literal fills/strokes that are neither a style nor a variable, text without a text style, placeholder copy, detached instances, WCAG AA contrast against the effective background, default layer names, and (opt-in) empty text, literal effects, off-scale spacing and off-scale radius. Every finding carries nodeId, stable key, name, type, path, rule, severity and the value that caused it. With suggest:true (default) a hardcoded colour also carries exact local paint-style and colour-variable candidates, and unstyled text carries exact local text-style candidates; spacing/radius findings name the nearest on-scale value. It never edits the document.
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": "figma_audit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rules | No | Rules to run. Defaults to duplicate-key, unkeyed-node, hardcoded-fill, hardcoded-stroke, unstyled-text, placeholder-text, detached-instance, contrast, default-name. Add spacing, radius, empty-text or hardcoded-effect explicitly. | |
| 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. | |
| suggest | No | Attach exact local paint-style, colour-variable and text-style candidates to findings; never applies them | |
| maxNodes | No | Stop after this many visible nodes | |
| rootNodeId | No | Page or subtree to audit; defaults to the current page | |
| maxFindings | No | List at most this many findings; counts are still complete | |
| radiusScale | No | Allowed corner radii | |
| spacingScale | No | Allowed spacing values, e.g. [0,4,8,12,16,24,32]. When omitted, spacingMultiple is used. | |
| includeHidden | No | Audit hidden layers too | |
| radiusMultiple | No | Off-scale radius means not a multiple of this | |
| spacingMultiple | No | Off-scale spacing means not a multiple of this |