Skip to main content
Glama

Use Figma

figma_local_use_figma
Destructive

Execute JavaScript against the Figma Plugin API to create, edit, inspect, or sync frames, components, text, styles, variables, and layouts in design files and FigJam boards.

Instructions

Create, edit, inspect or sync anything in a Figma file by running JavaScript against the Figma Plugin API: frames, components, variants, variables, styles, text, auto layout, images and whole screens. Works in design files and FigJam boards. Requires the companion "Figma MCP Bridge" plugin to be running in the target file in the Figma desktop app. The code runs as the body of an async function with figma in scope. Use return to send JSON-serializable data back (nodes are returned as {id, name, type}; bytes from exportAsync come back as images). A single expression is returned automatically. console.log output is captured. GOTCHAS: the plugin uses dynamic page loading, so use async APIs: await figma.getNodeByIdAsync(id), await figma.setCurrentPageAsync(page), await page.loadAsync() before reading another page. Call await figma.loadFontAsync({family, style}) before setting text; the Inter style is "Semi Bold", not "SemiBold". Append new nodes to a parent and position them, and return the IDs of what you created. Each call is committed as one undo step.

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": {
      "fileKey": "<fileKey>",
      "code": "<code>",
      "description": "<description>"
    },
    "name": "figma_local_use_figma"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesJavaScript to execute. Has access to the `figma` global (Figma Plugin API).
fileKeyYesThe key of the Figma file to edit (from the URL). Used to pick the right plugin connection when several files are open.
timeoutMsNoExecution timeout in milliseconds. Defaults to 60000.
descriptionYesA concise description of what the code aims to do.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and openWorldHint=false; the description adds substantial context beyond them, including that each call commits as one undo step, that console.log output is captured, how return values are serialized (nodes as {id, name, type}, exportAsync bytes as images), and the dynamic-page-loading and font-loading gotchas. This is exactly the behavioral detail an agent needs before writing a mutation script.

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 capability statement is front-loaded, prerequisites follow, then return semantics and a clearly labeled GOTCHAS block. It is long, but nearly every sentence carries actionable information; only the enumeration of node types is mildly redundant.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a no-output-schema, free-form code-execution tool, the description covers invocation contract, environment, return serialization, prerequisites, and the most common failure modes (sync node APIs, missing loadFontAsync, style-name casing). An agent has enough to call this correctly without further discovery.

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%, so the baseline would be 3, but the description adds real meaning for `code`: it runs as the body of an async function with `figma` in scope, `return` sends JSON-serializable data, and a bare expression is auto-returned. It leaves `timeoutMs` and the `description` parameter unaddressed, which keeps it short of a 5.

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 set and resource: run JavaScript against the Figma Plugin API to create, edit, inspect or sync frames, components, variables, styles, etc. It also names the scope (design files and FigJam boards), which lets an agent distinguish this mutation/execution tool from the read-oriented siblings like get_design_context or get_screenshot.

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?

Gives clear operating context: the companion 'Figma MCP Bridge' plugin must be running in the target file in the desktop app, and the code executes as an async function body. It does not explicitly route the agent away from this tool toward read-only siblings such as get_metadata or get_screenshot, so there is no stated exclusion, but the practical prerequisites are unambiguous.

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