Skip to main content
Glama
LeoGCode

figma-reader-mcp

by LeoGCode

figma_token_usage

Read-only

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

TableJSON Schema
NameRequiredDescriptionDefault
fileYesPath 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_idNo
refreshNoSkip 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_countNoDrop values used fewer times (default 1)
include_hiddenNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only say readOnlyHint and openWorldHint; the description adds substantial behavioral context: counts, variable/style binding, typography edge cases, textWithoutTypography accounting, exportedAt/fileModifiedAt meaning, and the local-file staleness trap. This far exceeds what structured annotations provide and correctly aligns with readOnlyHint.

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?

The description is front-loaded with the core purpose and use case, then adds genuinely necessary caveats about timestamps, typography, and refresh. It is dense and somewhat tangled, but every sentence earns its place given the absence of an output schema.

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?

The description covers result composition, counting semantics, typography edge cases, and snapshot timing, which is strong given no output schema. It still leaves node_id and include_hidden behavior underspecified, though their schema types provide some basic signal.

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

Parameters3/5

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

Schema description coverage is 60%, and the tool description supplements refresh semantics and subtree scoping, but node_id and include_hidden are left to their bare schema types. The file parameter's key/URL/path nuance is largely schema-provided; the description adds a little extra but does not fully compensate for the undocumented parameters.

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?

The description states a precise operation: scan a subtree or whole file and aggregate raw design values actually used, listing the value categories and counts. It also distinguishes the tool's purpose from variable/style-based tools, making it easy for an agent to tell it apart from siblings like figma_get_variables and figma_get_styles.

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?

It gives an explicit intended use—'derive a token set from files that do not define variables or styles'—and explains when to pass refresh versus when it is ignored. It implies alternatives but does not explicitly name them or give when-not-to-use conditions, so it falls just short of a 5.

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