Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

FigConn controls Figma Desktop through a local plugin (no REST API, no quota). Start with status to see connected files (each has editorType figma|figjam; pass file to target one). Read: get_document, get_selection, get_node, get_layout_tree, get_screenshot (PNG/JPG/SVG), save_screenshots. Create: create_frame, create_text, create_shape, create_svg, create_image, create_page, create_section. Edit: set_properties, set_auto_layout, set_layout_child, set_effects, set_gradient, set_stroke, set_constraints. Structure/arrange: duplicate_nodes, group_nodes, ungroup_node, reparent_nodes, reorder_nodes, place_relative, align_nodes, distribute_nodes, arrange_grid. Design systems: get_variables, create_variable_collection, create_variables, bind_variable, set_variable_mode, get_styles, create_paint_style, create_text_style, create_effect_style, apply_style, create_component, combine_as_variants, add_component_property, create_instance, set_instance_properties. Prototype: get_prototype_connections, trace_prototype_flow, set_reaction. FigJam-only: create_sticky, create_shape_with_text, create_connector, create_table (variables, styles and components are not available in FigJam). For anything else use execute, which runs arbitrary Figma Plugin API code (async, figma in scope; document access is dynamic-page so use *Async APIs such as figma.getNodeByIdAsync and figma.variables.getLocalVariablesAsync). Colors are hex strings like #RRGGBB or #RRGGBBAA. Always check the result with get_screenshot after visual changes.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
statusA

Show the FigConn port and which Figma files currently have the plugin open.

executeB

Run arbitrary JavaScript against the Figma Plugin API inside the plugin. The code is the body of an async function with figma and h (helpers: h.hex(hex)->Paint, h.rgb(hex)->RGB(A), h.node(id), h.ser(node, depth), h.loadFonts(textNode), h.findVariable(nameOrId)) in scope. return a JSON-serialisable value (nodes are auto-serialised). Use *Async APIs (dynamic-page).

get_documentC

List pages and the top-level nodes of the current (or given) page.

get_selectionC

Return the current selection (serialised, with children up to depth).

get_nodeB

Return a node and its children up to depth (default 2).

set_selectionB

Select nodes and scroll/zoom them into view.

create_frameC

Create a frame (optionally with auto layout) on the page or inside a parent.

create_textC

Create a text node. Font is loaded automatically.

set_propertiesB

Set arbitrary properties on nodes (e.g. {"name":"Card","opacity":0.5,"layoutMode":"VERTICAL","itemSpacing":8,"fills":"#FF0000","characters":"Hi"}). fills/strokes accept a hex string; characters loads fonts; width/height resize.

delete_nodesD

Delete nodes.

get_variablesC

List local variable collections, modes and variables with their values per mode.

create_variable_collectionB

Create a variable collection with the given mode names (first mode renames the default).

create_variablesA

Create or update variables in a collection. values map mode name -> value: COLOR '#hex', FLOAT number, STRING string, BOOLEAN bool, or {"alias":"other/variable name"} (looked up in the same collection first; add "collection" to point elsewhere). A single value (not a map) applies to all modes. Existing variables with the same name are updated.

bind_variableB

Bind a variable to node properties. field: 'fill' | 'stroke' (paint color) or any bindable node field: width, height, itemSpacing, counterAxisSpacing, paddingTop/Right/Bottom/Left, cornerRadius, topLeftRadius..., strokeWeight, opacity, visible, characters, fontSize, fontFamily, fontStyle, fontWeight, lineHeight, letterSpacing, minWidth, maxWidth... 'padding' and 'cornerRadius' bind all sides.

set_variable_modeC

Set which mode of a collection a frame/section uses (e.g. Dark).

list_library_variablesB

List variable collections (and optionally variables) from enabled team libraries.

import_library_variableB

Import a library variable by key so it can be bound.

get_stylesB

List local paint, text, effect and grid styles.

create_paint_styleA

Create (or update by name) a paint style from a hex color or bound to a color variable.

create_text_styleB

Create (or update by name) a text style.

create_effect_styleC

Create (or update by name) a drop-shadow effect style.

apply_styleC

Apply a local style (by name or id) to nodes.

get_componentsB

List local components and component sets (with keys and variant properties).

create_componentA

Convert an existing node into a component (or create an empty one when nodeId is omitted).

combine_as_variantsB

Combine components into a component set. Name components like 'Size=Large, State=Hover' to define variant properties.

add_component_propertyB

Add a component property (BOOLEAN, TEXT, INSTANCE_SWAP, VARIANT) to a component or component set.

create_instanceC

Create an instance of a local component (id) or a library component/component set (key).

set_instance_propertiesC

Set component properties on instances (variant values, booleans, text, instance swap).

create_shapeA

Create a basic shape: RECTANGLE, ELLIPSE, LINE, POLYGON or STAR. Size defaults to 100x100 (height defaults to width). LINE: width is the length (no height; use rotation for direction) and gets a black 1px stroke unless stroke is given. POLYGON uses pointCount (sides, default 3); STAR uses pointCount (default 5) and innerRadius (0-1 ratio, default ~0.38). fill/stroke are hex (#RRGGBB / #RRGGBBAA), fill 'none' removes the default grey fill. cornerRadius works on RECTANGLE/POLYGON/STAR. rotation is in degrees (counter-clockwise, around the top-left corner) and is applied after positioning. Returns the created node.

create_svgA

Import SVG as editable vector layers (wrapped in a frame). Give either svg (raw markup) or path (local .svg file read by the server). Set width and/or height to scale it (only one -> proportional; both -> scale then stretch). flatten: true merges all shapes into a single vector inside the frame — handy for icons. Returns the frame (with children when flattened).

create_imageA

Place a raster image (PNG/JPEG/GIF; max 20 MB, max 4096x4096 px) as a rectangle with an IMAGE fill. source is an absolute local path, an http(s) URL or a data URI — the server loads the bytes. Default size is the image's natural size; give width or height alone to scale proportionally, or both to set the box (scaleMode decides how the image fits). With targetNodeId the image instead replaces the fills of an existing node (frame, rectangle, ellipse, ...) and no node is created. Returns the node plus image {hash, width, height}. Use create_svg for SVG files.

create_pageA

Create a new page. setCurrent: true switches to it. Returns {id, name, current}.

create_sectionA

Create a section (canvas organiser; parent must be the page or another section, not a frame). Default size 400x300. childIds moves existing nodes into the section keeping their position on canvas (per-node results in moved). fitToContent resizes/moves the section to wrap its children with padding (default 40) — it defaults to true when childIds are given without width/height, so create_section({name, childIds}) just wraps those nodes.

fit_sectionA

Resize a section (or a frame without auto layout) to wrap its children with padding (default 40). Children keep their position on canvas; the container moves/resizes around them. Give nodeId (returns the node) or nodeIds (returns per-node results with {id, error} on failure).

set_auto_layoutA

Add, change or remove auto layout on frames / components / instances. Only the options you pass are changed. gap: number, or 'AUTO' for space-between. padding: number | [vertical, horizontal] | [top,right,bottom,left] | {top,right,bottom,left}. primarySizing/counterSizing: HUG (auto) or FIXED. wrap (HORIZONTAL only) + counterGap = spacing between wrapped rows. mode NONE removes auto layout. Returns per-node results ({id, ok, ...} or {id, error}); one failing node does not abort the batch.

set_layout_childA

Set how nodes behave inside their auto-layout parent: horizontal/vertical sizing (FILL needs an auto-layout parent; HUG needs the node itself to be auto layout or text), positioning AUTO|ABSOLUTE (ignore auto layout), grow (1 = fill along parent's direction), alignSelf STRETCH|INHERIT (fill across parent's direction), and min/max width/height (null clears). Returns per-node results ({id, ok, ...} or {id, error}); one failing node does not abort the batch.

set_effectsA

Set effects on nodes. Replaces existing effects by default ([] clears all; mode 'append' adds). Shadows: color (alpha via #RRGGBBAA, default #00000040), x, y (default 0,4), blur (default 4), spread, blendMode, showShadowBehindNode (drop shadow only). Blurs (LAYER_BLUR / BACKGROUND_BLUR) use only blur and visible. Setting effects detaches any effect style. Returns per-node results ({id, ok, ...} or {id, error}); one failing node does not abort the batch.

set_gradientA

Apply a gradient paint to fills or strokes. Give either angle in degrees (0 = left→right, 90 = top→bottom, 180 = right→left, 45 = top-left corner → bottom-right corner; measured in the node's box so corners always hit 0%/100% for LINEAR; default 90 for LINEAR, 0 otherwise) or a raw 2x3 transform (Figma gradientTransform). RADIAL/DIAMOND/ANGULAR are centered and fill the box. mode replace (default) replaces all paints; append adds on top. Returns per-node results ({id, ok, ...} or {id, error}); one failing node does not abort the batch.

set_strokeA

Set stroke color / weight / alignment / dashes on nodes. color 'none' removes strokes. sides sets per-side weights (frames, components, instances, rectangles), e.g. {bottom: 1, top: 0, left: 0, right: 0} for a bottom border. Only the options you pass are changed. Returns per-node results ({id, ok, ...} or {id, error}); one failing node does not abort the batch.

duplicate_nodesA

Duplicate nodes. Each copy is offset by (offsetX, offsetY) from the previous one; count makes N copies with cumulative offset (copy k sits at original + k*offset). Copies stay in the original's parent (just above it) unless parentId is given, in which case they are appended there at the same relative x/y (+offset). Positions are ignored inside auto-layout parents. Returns per source node {id, clones:[...]}.

group_nodesA

Wrap nodes that share the same parent in a group (or, with asFrame, a transparent non-clipping frame sized to their bounds). Absolute positions and z-order are preserved. Returns the new group/frame with its children.

ungroup_nodeA

Ungroup groups, or unwrap frames/sections: children move to the container's parent at the same absolute position and z-order, and the container is deleted (a frame's own fill/stroke/effects are lost). Returns per node {id, children:[new child ids], parentId}.

reparent_nodesA

Move nodes into another parent (frame, group, section, page, component...). index inserts at that z-position (0 = bottom; multiple nodes go in consecutively); default is on top. keepPosition (default true) preserves the absolute on-canvas position unless the new parent's auto layout controls it. Returns per-node results ({id, ok, ...} or {id, error}); one failing node does not abort the batch.

reorder_nodesA

Change z-order (layer order) of nodes within their parent: 'front' (top), 'back' (bottom), 'forward' / 'backward' (one step), or a numeric index (0 = bottom). In auto-layout frames this also changes item order. Returns per node its new index.

get_screenshotA

Render a node as an image and return it inline. nodeId defaults to the first selected node. PNG/JPG come back as an image plus a text line 'name (id) w×h'; SVG comes back as SVG markup text. PDF cannot be shown inline — use save_screenshots to write it to disk. The scale is lowered automatically so the longest side stays ≤ maxDimension (default 4096 px).

save_screenshotsA

Export nodes to files on disk (PNG, JPG, SVG or PDF). Either pass items [{nodeId, path, format?, scale?}] or the shortcut nodeIds + dir (files are named from the sanitized node names, with the id appended on collisions). Paths may be absolute or relative to the server's working directory; parent directories are created. Returns metadata only (path, bytes, pixel size) — never the image data. Per-item errors don't abort the batch.

place_relativeA

Move a node next to another node: side right|left|below|above with a gap, aligned start|center|end along the other axis. Uses absolute (page) coordinates, so the two nodes may have different parents. Fails for auto-layout children that aren't absolutely positioned.

distribute_nodesA

Distribute nodes along an axis (ordered by current position). Without gap: the outermost nodes stay put and the spacing between them is equalised (needs ≥3 nodes). With gap: nodes are laid out sequentially from the first one with that fixed spacing. Works in absolute coordinates; per-node errors are reported.

align_nodesA

Align nodes' edges or centers: left|hcenter|right|top|vcenter|bottom. to: 'selection' (default — the union bounds of the given nodes), 'parent' (each node's parent frame), or a node id (that node's bounds; it is not moved).

arrange_gridA

Lay out nodes in a grid in the given order (row by row). Column width = widest node in that column, row height = tallest node in that row. Origin defaults to the top-left of the nodes' current union bounds (absolute coordinates). Handy for variant / component sheets.

align_to_gridA

Snap nodes' x/y (relative to their parent) to a grid of gridSize px; with snapSize also round width/height to the grid. Returns before/after per node.

set_constraintsA

Set resize constraints on nodes. Pass horizontal and/or vertical (MIN|MAX|CENTER|STRETCH|SCALE); the unspecified axis is kept. Auto-layout children that aren't absolutely positioned return an error. Returns previous and new values.

get_layout_treeA

Flat geometry dump of a subtree (pre-order): id, name, type, parentId, depth, absolute x/y/width/height (absoluteBoundingBox), absoluteRenderBounds, rotation, visible, and layoutMode/padding/itemSpacing, layoutPositioning, sizing (hug/fill/fixed), constraints where relevant. rootId defaults to the current page. truncated is true when maxNodes was hit.

scroll_into_viewA

Scroll the viewport to show nodes without changing the selection (switches page if needed). Without zoom it fits the nodes; with zoom (1 = 100%) it centers on them at that zoom level.

get_prototype_connectionsA

Read prototype interactions (Figma Design only; errors in FigJam). Walks a node and all descendants, including instance sublayers, and returns every node with reactions: trigger (timeouts/delays also as *Ms) and actions. NODE actions resolve destinationId to {id, name, type, screen (top-level frame), page}; SET_VARIABLE / SET_VARIABLE_MODE resolve variable, collection and mode names; CONDITIONAL actions are expanded recursively into blocks {condition, isElse, actions}. Also returns the page's flowStartingPoints (first = default). truncated is true when maxNodes was reached.

trace_prototype_flowA

Trace a prototype flow (Figma Design only). Breadth-first search from a start screen (or a node inside one) following NAVIGATE / OVERLAY / SWAP actions, including ones nested in conditionals and on instance sublayers. Returns screens [{id, name, page, depth, reachedFrom}], edges [{from screen, sourceNode, trigger, action, navigation, destination, to screen, transition, conditional/conditions, followed:false for SCROLL_TO/CHANGE_TO}] plus BACK/CLOSE/URL edges, unresolved destinations (deleted nodes), and pending screens discovered but not visited because maxScreens was reached.

set_reactionA

Add, replace or clear a prototype interaction on a node (Figma Design only). mode 'replace' (default) swaps out existing reactions with the same trigger; 'append' adds the action to the existing reaction with that trigger (multi-action) or creates one; 'clear' removes reactions with trigger (or all reactions when trigger is omitted). Actions: NAVIGATE, OVERLAY, SWAP, SCROLL_TO, CHANGE_TO (need destinationId; CHANGE_TO targets a sibling variant), BACK, CLOSE, URL (needs url). Transition omitted = instant. Use extraActions for raw Plugin API Action objects (e.g. SET_VARIABLE, CONDITIONAL). Returns the node's resulting reactions.

set_flow_starting_pointA

Add, rename, reorder or remove a prototype flow starting point (Figma Design only). The node must be a top-level frame. Adding an existing start just renames it. index 0 makes it the default flow. Returns the page's updated flowStartingPoints.

create_stickyA

Create a FigJam sticky note (FigJam only; errors in Figma Design). Font is loaded automatically. Placed at viewport center when no parent/x/y is given.

create_shape_with_textB

Create a FigJam shape with text, e.g. flowchart boxes (FigJam only). shapeType ENG_DATABASE = cylinder, ENG_QUEUE = horizontal cylinder. Default ROUNDED_RECTANGLE 208x208.

create_connectorA

Create a FigJam connector line (FigJam only). Each end is either attached to a node (startNodeId/endNodeId + magnet, default AUTO) or a free canvas point (startX/startY, endX/endY). Optional label text.

create_tableB

Create a FigJam table (FigJam only). rows/columns default to the size of cells (or 2x2). cells is a 2D array of strings [row][column]; fonts are loaded automatically. Per-cell failures are reported in errors.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

C2.8/5.0

Scored across 62 tools

Disambiguation4/5

Most tools map to clearly distinct Figma operations, with detailed descriptions that clarify subtle differences such as set_properties vs. set_instance_properties and set_auto_layout vs. set_layout_child. A few similarly prefixed layout/alignment tools and the broad `execute` escape hatch create minor misselection risk, but overall boundaries are understandable.

Naming Consistency4/5

The tool names are overwhelmingly consistent snake_case verb_noun patterns (create_frame, set_effects, get_variables). Exceptions like `status`, `execute`, and `scroll_into_view` are minor deviations but still readable and predictable.

Tool Count1/5

At 62 tools, the surface is far beyond the typical agent-friendly 3–15 range and exceeds even the 25+ 'too many' threshold. Although each tool maps to a real Figma capability, the set is over-scoped and increases discovery and selection burden.

Completeness4/5

The server covers a broad lifecycle for Figma Design and FigJam, including nodes, styles, variables, components, auto layout, prototyping, export, and FigJam primitives. Minor gaps remain around deleting variables/styles, managing pages beyond creation, and some component property lifecycle operations.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues