Skip to main content
Glama
kiettt8-product

figma-ui-mcp

figma_write

Execute JavaScript code to create or modify Figma designs, providing direct programmatic control over nodes, layouts, styles, and component properties.

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. When a design-system bundle is configured, call design_system_plan with the user's full request before writing; the server enforces this gate. Use figma.loadBundleAsset(reference, opts) for resolved internal SVG or raster assets, then call figma_validate after writing. Use the figma proxy object — all methods return Promises, use async/await. 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.

Input Schema

TableJSON 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.
Behavior5/5

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

With no annotations provided, the description fully covers behavioral traits: mandatory pre-conditions, sandbox restrictions, async Promise-based methods, and specific side effects of misuse. It also enumerates supported operation categories, which is far beyond minimal disclosure.

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 lengthy and detailed, but appropriately so for a complex tool with many capabilities. It is front-loaded with the mandatory warning and organized into logical sections (operations, tokens, prototyping, etc.). Slightly verbose but every sentence carries useful information.

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?

Thoroughly covers the tool's complexity: operation types, asset handling, validation, design tokens, prototype interactions, sandbox limits, and required ordering. However, it does not describe return values or error handling, which would be helpful given the absence of an output schema. Otherwise highly complete.

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 covers 100% of parameters, but description adds substantial meaning for `code` by providing operation examples, design token APIs, and expected JavaScript patterns. The `sessionId` parameter is not elaborated, but schema already handles it. The added detail raises value above 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?

Clearly states it executes JavaScript code to CREATE or MODIFY designs in Figma, with a specific verb and resource. Distinguishes itself from sibling tools like figma_read and figma_validate by focusing on write operations and listing concrete operation types.

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?

Explicitly mandates calling figma_docs before writing, and design_system_plan when configured, with warnings about consequences. Names figma_validate as a follow-up step, providing clear when-to-use context and differentiating from alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kiettt8-product/figma-ui-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server