figma_token_usage
Aggregate raw design values (colors, typography, radii, gaps) from a Figma subtree, with usage counts and variable bindings, to derive token sets from files without variables or styles.
Instructions
Scan a subtree (or whole file) and aggregate the raw design values actually used: colors, typography combos, corner radii, auto-layout gaps/paddings, stroke widths, effects, each with counts and the variable/style bound where present. Useful to derive a token set from files that do not define variables or styles. A typography entry carries only the properties the file records, and always at least one: text that records none of them is counted in textWithoutTypography instead, so it is accounted for without standing in the list as an entry naming no value. The result is dated by the copy it answers from. exportedAt is the ISO-8601 time this tool exported that snapshot through the browser: report what the design said then rather than as current, and pass refresh to export it again. For a local .fig the field is fileModifiedAt, that copy's own file time, which copying, syncing or re-downloading the file resets: the design data can be older than it says, and nothing here can date it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Path to a local .fig file, or a Figma file key / figma.com/design/... URL. A node-id in the URL is used when this tool takes node_id and it is omitted; a tool that answers about the whole file ignores it. A key or URL uses a local '<name> [<key>].fig' from FIGMA_FILES_DIRS when one exists, otherwise exports through the browser. | |
| node_id | No | ||
| refresh | No | Skip local/cached copies and export the live file through the browser. Has no effect when file is a path to a .fig: that file is read as it is on disk and the result carries refreshIgnored; pass the key or URL to export the live file instead. | |
| min_count | No | Drop values used fewer times (default 1) | |
| include_hidden | No |