MCP tools

Tools exposed by figma-agent-mcp (37 total). Unless noted, calls are forwarded to the open Figma plugin over the bridge.

Conventions

ConventionDetail
fileKeyOptional on almost all tools — select which connected file to use
Flat vs propertiesMany write tools accept flat fields (name, x, …) or a nested properties object (merged on the plugin side)
Selection fallbackWhen nodeIds is omitted for screenshot / metadata / design context / zoom, the plugin uses the current selection
MotionRequires a Figma build that exposes motion APIs; otherwise a clear capability error is returned

Meta (MCP-local)

ToolDescription
list_filesList Figma files currently connected to the bridge (leader local / follower via /files)
save_screenshotsExport nodes to disk. PNG defaults to TinyPNG-style compression (compress=true). scale default 2; use scale=3 for slice assets matching the plugin UI export. Supports format: PNG / SVG / JPG / PDF, optional clip, path

Read

ToolDescription
get_documentCurrent page tree overview (depth optional, 0–20)
get_selectionCurrent selection
get_nodeSerialize node(s) by id (nodeIds required, depth optional)
get_stylesLocal paint / text / effect styles
get_metadataLightweight id / name / type / size
get_design_contextSerialized nodes for agent context
get_variable_defsLocal variable collections and variables
get_screenshotRaster/vector export; wire uses raw bytes (MsgPack bin), agent result is base64. Default format=PNG, scale=2. Uncompressed — prefer save_screenshots for compressed slices

Write / mutate

ToolDescription
set_node_visibilityShow / hide (visible)
set_text_contentSet text characters (text)
set_text_propertiesFont size / family / style / align / spacing
set_node_propertiesName, position, size, opacity, rotation
set_solid_fillSolid paint (color: {r,g,b,a?}, 0–1 or 0–255)
set_gradient_fillGradient fill (gradientStops, optional gradientType)
set_effectsShadows / blurs (effects array)
set_stroke_propertiesStroke weight / align / color
set_auto_layoutAuto-layout on frames
create_frameCreate a frame
create_textCreate a text node
create_shapeCreate RECTANGLE / ELLIPSE / LINE / POLYGON / STAR
create_imageRectangle with image fill from base64 imageData
duplicate_nodesDuplicate
reparent_nodesMove in hierarchy (parentId, optional index)
group_nodesGroup
ungroup_nodeUngroup
set_selectionChange selection
scroll_and_zoom_into_viewFocus viewport
delete_nodesDelete nodes

Motion (Figma Motion API beta)

ToolDescription
get_motion_stylesList available animation styles / presets
get_node_motionRead animation styles, keyframes, timelines
apply_animation_styleApply style (styleId, optional animationStyleData) — use animationStyleData.type: "FIGMA" for built-in presets
remove_animation_styleRemove one style or all (animationStyleId optional)
apply_manual_keyframe_trackWrite a manual keyframe track (field, track)
remove_manual_keyframe_trackRemove a manual keyframe track (field)
set_timeline_durationSet timeline duration (timelineId, duration)

Example agent flow

  1. list_files
  2. get_selection / get_node
  3. get_screenshot for a quick preview
  4. save_screenshots with scale: 3, compress: true for delivery slices
  5. set_text_content / set_node_properties (or motion tools) to apply edits

Schema source

Authoritative Zod schemas live in packages/figma-agent-mcp/src/schema.ts. Tool registration is in tools.ts.