Skip to main content
Glama
figma-mcp-v2

figma-mcp-v2

by LukasAnda

Bind raw colors to variables

figma_bind_tokens

Finds unbound solid fills, strokes, and styled text colors in selected Figma layers, then binds each to an exactly matching variable from a collection and reports changed paints and unmatched colors.

Instructions

Finds solid colors (fills, strokes and styled text ranges) in the given layers that are not bound to a variable, and binds each to the variable in a collection whose value matches exactly. Use after building or importing layers so they follow the design tokens. Returns how many paints changed and which colors had no matching token.

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": {
      "node_ids": "<node_ids>",
      "collection": "<collection>"
    },
    "name": "figma_bind_tokens"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoFigma link (or file key) of the file to edit. Needed only when the plugin is open in more than one file.
skipNoVariables never chosen by value, e.g. role tokens that share a value with a base token ("color/on-highlight")
preferNoVariables chosen first when several share a value
rebindNoAlso re-match paints currently bound to a skipped variable
node_idsYesRoot layers to process (their whole subtrees)
collectionYesVariable collection name or id to match against
translucentNoAlso bind paints with opacity below 1 (scrims, tints); off by default

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare that this is a non-read-only, non-destructive, non-idempotent, open-world operation. The description adds useful behavioral detail beyond those annotations: only unbound solid colors are changed, matching is by exact variable value, and the result reports how many paints changed and which colors had no matching token. It still omits partial-failure behavior and permission requirements, so it is strong but not exhaustive.

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

Conciseness5/5

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

Three tight sentences with no waste: the operation is front-loaded, the usage context follows, and the return summary comes last. Every sentence contributes information the agent needs.

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?

For a seven-parameter mutation tool without an output schema, the description covers the core change, the usage moment, and the return summary. The schema and annotations fill in parameter and safety details, but the description does not address partial failures or the high-level implications of options like rebind and translucent, so it is not fully complete.

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 100%, and the schema itself explains skip, prefer, rebind, translucent, url, node_ids, and collection in detail. The description reinforces the collection and exact-match context but adds no new meaning beyond the schema's parameter documentation, so the baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: finds unbound solid colors in fills, strokes, and styled text ranges and binds each to an exact-value variable in a collection. It is clear what the tool does, but it does not explicitly distinguish itself from the sibling figma_bind_variable or explain why this bulk variant should be chosen instead.

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?

Provides a clear usage context: use it after building or importing layers so they follow the design tokens. It does not give when-not-to-use guidance or name alternatives such as figma_bind_variable, so it falls 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.