Skip to main content
Glama
figma-bridge-mcp

figma-bridge-mcp

figma_write

Executes JavaScript to create or modify Figma designs, letting AI assistants draw, edit, and build layouts directly on the canvas through a sandboxed local bridge.

Instructions

Execute JavaScript code to CREATE or MODIFY designs in Figma. ⚠️ MANDATORY: Call figma_docs BEFORE writing any design code. Skipping figma_docs causes hardcoded colors, wrong sizing, broken layouts, and low-quality UI. Use the figma proxy object — all methods return Promises, use async/await. REUSE BEFORE DRAWING: check get_local_components / figma_rules first. Shared pieces → figma.instantiate({ componentId, parentId, overrides }); a frame to start from → figma.clone({ id, parentId, overrides }) (both return the copy's layers). Never redraw what already exists; create() warns when a component of that name exists. Operations: create, modify, delete, clone, group, ungroup, flatten, resize, set_selection, set_viewport, batch (multiple ops in one call). Design Tokens: createVariableCollection, createVariable, setVariableValue, addVariableMode, renameVariableMode, removeVariableMode, applyVariable, setFrameVariableMode, clearFrameVariableMode, createPaintStyle, createTextStyle, createComponent. Prototyping: setReactions, getReactions, removeReactions (click/hover/press → navigate/overlay/swap with Smart Animate transitions). Scroll: setScrollBehavior (overflowDirection: NONE/HORIZONTAL/VERTICAL/BOTH). Variants: setComponentProperties, swapComponent, getComponentProperties. Component property definitions (master-side, required for instance text overrides to recalc auto-layout): addComponentProperty (TEXT/BOOLEAN/INSTANCE_SWAP), bindComponentPropertyToText, removeComponentProperty. The code runs in a sandboxed VM: no access to require, process, fs, fetch, or network.

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": {
      "code": "<code>"
    },
    "name": "figma_write"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesJavaScript using figma.create(), figma.modify(), figma.setPage(), etc.
sessionIdNoTarget a specific Figma file/tab when multiple are connected. Omit to auto-select.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.6.1

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: it discloses the sandboxed VM constraints (no require, process, fs, fetch, or network), that all methods return Promises requiring async/await, and that create() warns on duplicate component names. It does not cover permission/auth requirements or the recoverability of delete/ungroup operations, leaving a gap for destructive actions.

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?

Front-loaded with the action and the mandatory prerequisite, then organized with labeled sections (REUSE BEFORE DRAWING, Operations, Design Tokens, Prototyping, etc.). It is dense and enumerates API methods that arguably belong in figma_docs, but each block maps to a real capability the agent must choose among.

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 two-parameter tool that executes arbitrary code, the definition is unusually thorough on available operations and the reuse model. The main omission is that it never explains what the code call returns or how operation results/errors surface back to the agent.

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

Parameters4/5

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

Schema coverage is 100% for the two parameters, so baseline is 3, but the description adds real meaning: it explains the `figma` proxy object, the async/await convention, and enumerates the operation names available inside the code string beyond the schema's brief example. The sessionId parameter is not further illuminated, capping this at 4.

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 (execute JavaScript) and resource (designs in Figma) with explicit scope: CREATE or MODIFY. It is clearly separable from siblings like figma_read and figma_export_files, which cannot write designs.

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

Usage Guidelines5/5

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

Gives explicit prerequisites ("Call figma_docs BEFORE writing any design code"), a pre-flight check (get_local_components / figma_rules), and a decision rule between alternatives: shared component → figma.instantiate, a frame to start from → figma.clone. It also warns against redrawing existing elements.

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