Skip to main content
Glama
LeoGCode

figma-reader-mcp

by LeoGCode

figma_token_usage

Read-only

Scan a Figma subtree to aggregate used colors, typography, radii, spacing, strokes, and effects with counts and bound styles, helping derive design tokens when variables or styles are missing.

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. Dated by exportedAt and account, or fileModifiedAt for a file read from disk, as the server's instructions say (figma-reader help on the command line).

Input Schema

NameRequiredDescriptionDefault
fileYesA local .fig path, a Figma file key or a figma.com/design/... URL (see the server's instructions, or figma-reader help)
node_idNo
refreshNoExport the live file again rather than read a local or cached copy (see the server's instructions, or figma-reader help)
min_countNoDrop values used fewer times (default 1)
include_hiddenNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.4.2
    • changedInput schema / properties / file / description
      Previous value: -"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."New value: +"A local .fig path, a Figma file key or a figma.com/design/... URL (see the server's instructions, or figma-reader help)"
    • changedInput schema / properties / refresh / description
      Previous value: -"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."New value: +"Export the live file again rather than read a local or cached copy (see the server's instructions, or figma-reader help)"
  2. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations cover readOnly/openWorld, and the description goes well beyond them: it explains the aggregate shape (counts + bound variable/style), the typography edge case (entries carry only recorded properties; text with none is counted in textWithoutTypography), and the dating rules (exportedAt/account vs fileModifiedAt). These are genuine behavioral details, though it leans heavily on pointing to external 'server instructions' rather than stating rules inline.

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

Conciseness3/5

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

Purpose is front-loaded in the first sentence, but the description is bloated: the typography-exclusion explanation is a long clause, and 'as the server's instructions say (figma-reader help on the command line)' is repeated, deferring to external docs twice.

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 no output schema, the description carries the return-value burden and does so well -- it enumerates the aggregated categories, mentions counts and bindings, and handles the typography edge case. Remaining gaps are minor (include_hidden, exact grouping of output).

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 coverage is 60%, so the schema documents file, refresh, and min_count while node_id and include_hidden are bare. The description only indirectly signals node_id ('scan a subtree') and refresh ('a file read from disk'); include_hidden is never addressed. It adds marginal value, aligning with the 3 baseline.

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?

States a specific verb and resource -- scan a subtree/whole file and aggregate raw design values (colors, typography, radii, gaps, stroke widths, effects) with counts. It also distinguishes itself from the sibling style/variable tools by noting it is for 'files that do not define variables or styles'.

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

Usage Guidelines3/5

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

It gives a use condition ('to derive a token set from files that do not define variables or styles'), which implicitly excludes files that do have variables/styles. But it never names figma_get_variables or figma_get_styles as the alternatives to reach for in that case, so routing is left to inference.

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