Available Tools - Detailed Documentation
This guide provides detailed documentation for each tool, including when to use them and best practices.Note: Local Mode (NPX/Git) provides 59+ tools with full read/write capabilities and real-time monitoring. Remote Mode provides 43 read-only tools by default, or (((43 tools))) (including full write access) when paired with the Desktop Bridge plugin via Cloud Relay. Tools marked “Local” in the table below require Local Mode. Tools marked “Local / Cloud” work in both Local Mode and Cloud Mode (after pairing).
Quick Reference
| Category | Tool | Purpose | Mode |
|---|---|---|---|
| 🧭 Navigation | figma_navigate | Open a Figma URL and start monitoring | All |
figma_get_status | Check browser and monitoring status | All | |
figma_reconnect | Reconnect to Figma Desktop | Local | |
| 📋 Console | figma_get_console_logs | Retrieve console logs with filters | All |
figma_watch_console | Stream logs in real-time | All | |
figma_clear_console | Clear log buffer | All | |
| 🔍 Debugging | figma_take_screenshot | Capture UI screenshots | All |
figma_reload_plugin | Reload current page | All | |
| 🎨 Design System | figma_get_variables | Extract design tokens/variables | All |
figma_get_styles | Get color, text, effect styles | All | |
figma_get_component | Get component data | All | |
figma_get_component_for_development | Component + visual reference | All | |
figma_get_component_image | Just the component image | All | |
figma_get_file_data | File structure with verbosity control | All | |
figma_get_file_for_plugin | File data optimized for plugins | All | |
figma_get_design_system_kit | Full design system in one call (tokens, components, styles, visual specs) | All | |
figma_get_design_system_summary | Overview of design system | Local / Cloud | |
figma_get_token_values | Get variable values by mode | Local / Cloud | |
| ✏️ Design Creation | figma_execute | Run Figma Plugin API code | Local / Cloud |
figma_arrange_component_set | Organize variants with labels | Local / Cloud | |
figma_set_description | Add component descriptions | Local / Cloud | |
| 🧩 Components | figma_search_components | Find components by name (local + library) | Local / Cloud |
figma_get_library_components | Discover components from published libraries | Local | |
figma_get_component_details | Get component details | Local / Cloud | |
figma_instantiate_component | Create component instance (local + library) | Local / Cloud | |
figma_add_component_property | Add component property | Local / Cloud | |
figma_edit_component_property | Edit component property | Local / Cloud | |
figma_delete_component_property | Remove component property | Local / Cloud | |
| 🔧 Variables | figma_create_variable_collection | Create collections with modes | Local / Cloud |
figma_create_variable | Create new variables | Local / Cloud | |
figma_update_variable | Update variable values | Local / Cloud | |
figma_rename_variable | Rename variables | Local / Cloud | |
figma_delete_variable | Delete variables | Local / Cloud | |
figma_delete_variable_collection | Delete collections | Local / Cloud | |
figma_add_mode | Add modes to collections | Local / Cloud | |
figma_rename_mode | Rename modes | Local / Cloud | |
figma_batch_create_variables | Create up to 100 variables at once | Local / Cloud | |
figma_batch_update_variables | Update up to 100 variables at once | Local / Cloud | |
figma_setup_design_tokens | Create collection + modes + variables atomically | Local / Cloud | |
| 🔍 Design-Code Parity | figma_check_design_parity | Compare Figma specs vs code implementation | All |
figma_generate_component_doc | Generate component documentation from Figma + code | All | |
| 💬 Comments | figma_get_comments | Get comments on a Figma file | All |
figma_post_comment | Post a comment, optionally pinned to a node | All | |
figma_delete_comment | Delete a comment by ID | All | |
| 📐 Node Manipulation | figma_resize_node | Resize a node | Local / Cloud |
figma_move_node | Move a node | Local / Cloud | |
figma_clone_node | Clone a node | Local / Cloud | |
figma_delete_node | Delete a node | Local / Cloud | |
figma_rename_node | Rename a node | Local / Cloud | |
figma_set_text | Set text content | Local / Cloud | |
figma_set_fills | Set fill colors | Local / Cloud | |
figma_set_strokes | Set stroke colors | Local / Cloud | |
figma_create_child | Create child node | Local / Cloud | |
| 🖼️ Image | figma_set_image_fill | Set image fill on nodes | Local / Cloud |
| 🔍 Design Lint | figma_lint_design | WCAG accessibility and design quality checks | Local / Cloud |
| ☁️ Cloud Relay | figma_pair_plugin | Generate pairing code for Desktop Bridge | Cloud |
🧭 Navigation & Status Tools
figma_navigate
Navigate to any Figma URL to start monitoring.
Usage:
- Navigation status
- Current URL
- Console monitoring status
figma_get_status
Check connection and monitoring status. In local mode, validates WebSocket transport connectivity and shows connection state.
Usage:
- Setup validation (local mode only):
setup.valid- Whether the WebSocket transport is availablesetup.message- Human-readable statussetup.transport- Transport status (websocketornone)setup.setupInstructions- Step-by-step setup guide (if no transport available)setup.ai_instruction- Guidance for AI assistants
- Browser connection status
- Console monitoring active/inactive
- Current URL (if navigated)
- Number of captured console logs
- Call this tool first when starting a session in local mode
- If
setup.validis false, guide user to install and run the Desktop Bridge Plugin
📋 Console Tools (Plugin Debugging)
figma_get_console_logs
💡 Plugin Developers in Local Mode: This tool works immediately - no navigation required! Just check logs, run your plugin in Figma Desktop, check logs again. AllRetrieve console logs with filters. Usage:[Main],[Swapper], etc. plugin logs appear instantly.
count(optional): Number of recent logs to retrieve (default: 100)level(optional): Filter by log level (default: ‘all’)since(optional): Unix timestamp in milliseconds - only logs after this time
- Array of console log entries with:
timestamp: Unix timestamp (ms)level: ‘log’, ‘info’, ‘warn’, ‘error’, ‘debug’message: The log messageargs: Additional arguments passed to console methodstackTrace: Stack trace (for errors)
figma_watch_console
Stream console logs in real-time for a specified duration.
Usage:
duration(optional): How long to watch in seconds (default: 30, max: 300)level(optional): Filter by log level (default: ‘all’)
- Real-time stream of console logs captured during the watch period
- Summary of total logs captured by level
figma_clear_console
Clear the console log buffer.
Usage:
- Confirmation of buffer cleared
- Number of logs that were cleared
🔍 Debugging Tools
figma_take_screenshot
Capture screenshots of Figma UI.
Usage:
target(optional): What to screenshot'plugin': Just the plugin UI (default)'full-page': Entire scrollable page'viewport': Current visible viewport
format(optional): Image format (default: ‘png’)quality(optional): JPEG quality 0-100 (default: 90)filename(optional): Custom filename
- Screenshot image
- Metadata (dimensions, format, size)
figma_reload_plugin
Reload the current Figma page.
Usage:
- Reload status
- New page URL (if changed)
🎨 Design System Tools
⚠️ All Design System tools require FIGMA_ACCESS_TOKEN configured in your MCP client.
See Installation Guide for setup instructions.
figma_get_variables
Extract design tokens/variables from a Figma file. Supports both main files and branches.
Usage:
figma_navigate, you can omit fileUrl entirely:
fileUrl(optional): Figma file URL - supports main files and branches (uses current if navigated)includePublished(optional): Include published variables (default: true)enrich(optional): Add exports and usage analysis (default: false)export_formats(optional): Code formats to generateinclude_usage(optional): Include usage in styles/componentsinclude_dependencies(optional): Include dependency graphrefreshCache(optional): Force fresh data fetch, bypassing cache
- Variable collections
- Variables with modes and values
- Summary statistics
- Export code (if
enrich: true) - Usage information (if
include_usage: true) - Branch info (when using branch URL):
fileKey,branchId,isBranch
figma_get_styles
Get all styles (color, text, effects) from a Figma file.
Usage:
fileUrl(optional): Figma file URLenrich(optional): Add exports and usage (default: false)export_formats(optional): Code formats to generateinclude_usage(optional): Show where styles are usedinclude_exports(optional): Include code examples
- All styles (color, text, effect, grid)
- Style metadata and properties
- Export code (if
enrich: true) - Usage information (if requested)
figma_get_component
Get component data in two export formats: metadata (default) or reconstruction specification.
Usage:
fileUrl(optional): Figma file URLnodeId(required): Component node ID (e.g., ‘123:456’)format(optional): Export format -'metadata'(default) or'reconstruction'enrich(optional): Add quality metrics (default: false, only for metadata format)
- Component metadata and documentation
- Properties and variants
- Bounds and layout info
- Token coverage (if
enrich: true) - Use for: Documentation, style guides, design system references
- Complete node tree specification
- All visual properties (fills, strokes, effects)
- Layout properties (auto-layout, padding, spacing)
- Text properties with font information
- Color values in 0-1 normalized RGB format
- Validation of spec against plugin requirements
- Use for: Programmatic component creation, version control, component migration
- Compatible with: Figma Component Reconstructor plugin
figma_get_component_for_development
Get component data optimized for UI implementation, with visual reference.
Usage:
fileUrl(optional): Figma file URLnodeId(required): Component node IDincludeImage(optional): Include rendered image (default: true)
- Component image (rendered at 2x scale)
- Filtered component data with:
- Layout properties (auto-layout, padding, spacing)
- Visual properties (fills, strokes, effects)
- Typography
- Component properties and variants
- Bounds and positioning
figma_get_component_image
Render a component as an image only.
Usage:
fileUrl(optional): Figma file URLnodeId(required): Node ID to renderscale(optional): Scale factor (default: 2)format(optional): Image format (default: ‘png’)
- Image URL (expires after 30 days)
- Image metadata
figma_get_file_data
Get file structure with verbosity control.
Usage:
fileUrl(optional): Figma file URLdepth(optional): Depth of children tree (max: 3)verbosity(optional): Data detail level'summary': IDs, names, types only (~90% smaller)'standard': Essential properties (~50% smaller)'full': Everything
nodeIds(optional): Retrieve specific nodes onlyenrich(optional): Add statistics and metrics
- File metadata
- Document tree (filtered by verbosity)
- Component/style counts
- Statistics (if
enrich: true)
figma_get_file_for_plugin
Get file data optimized for plugin development.
Usage:
fileUrl(optional): Figma file URLdepth(optional): Depth of children (max: 5, default: 2)nodeIds(optional): Specific nodes only
- Filtered file data with:
- IDs, names, types
- Plugin data (pluginData, sharedPluginData)
- Component relationships
- Lightweight bounds
- Structure for navigation
Tool Comparison
When to Use Each Tool
For Component Development:figma_get_component_for_development- Best for implementing UI components (includes image + layout data)figma_get_component_image- Just need a visual referencefigma_get_component- Need full component metadata
figma_get_file_for_plugin- Optimized file structure for pluginsfigma_get_console_logs- Debug plugin codefigma_watch_console- Monitor plugin execution
figma_get_variables- Design tokens with code exportsfigma_get_styles- Traditional styles with code exportsfigma_get_file_data- Full file structure with verbosity control
figma_get_console_logs- Retrieve specific logsfigma_watch_console- Live monitoringfigma_take_screenshot- Visual debuggingfigma_get_status- Check connection health
✏️ Design Creation Tools
⚠️ Requires Desktop Bridge Plugin: These tools require the Desktop Bridge plugin running in Figma. In Local Mode, the plugin connects via WebSocket. In Cloud Mode, pair first using figma_pair_plugin to connect through the cloud relay.
figma_execute
The Power Tool - Execute any Figma Plugin API code to create designs, modify elements, or perform complex operations.
When to Use:
- Creating UI components (buttons, cards, modals, notifications)
- Building frames with auto-layout
- Adding text with specific fonts and styles
- Creating shapes (rectangles, ellipses, vectors)
- Applying effects, fills, and strokes
- Creating pages or organizing layers
- Any operation that requires the full Figma Plugin API
code(required): JavaScript code to execute. Has access tofigmaglobal object.timeout(optional): Execution timeout in ms (default: 5000, max: 30000)
- Whatever the code returns (use
returnstatement) - Execution success/failure status
- Always use
awaitfor async operations (loadFontAsync, getNodeByIdAsync) - Return useful data (node IDs, names) for follow-up operations
- Position elements relative to viewport center for visibility
- Select created elements so users can see them immediately
- Use try/catch for error handling in complex operations
🔧 Variable Management Tools
⚠️ Requires Desktop Bridge Plugin: These tools require the Desktop Bridge plugin running in Figma. In Local Mode, the plugin connects via WebSocket. In Cloud Mode, pair first using figma_pair_plugin to connect through the cloud relay.
figma_create_variable_collection
Create a new variable collection with optional modes.
When to Use:
- Setting up a new design system
- Creating themed variable sets (colors, spacing, typography)
- Organizing variables into logical groups
name(required): Collection nameinitialModeName(optional): Name for the default mode (otherwise “Mode 1”)additionalModes(optional): Array of additional mode names to create
- Created collection with ID, name, modes, and mode IDs
figma_create_variable
Create a new variable in a collection.
When to Use:
- Adding design tokens to your system
- Creating colors, spacing values, text strings, or boolean flags
- Setting up multi-mode variable values
name(required): Variable name (use/for grouping)collectionId(required): Target collection IDresolvedType(required):"COLOR","FLOAT","STRING", or"BOOLEAN"valuesByMode(optional): Object mapping mode IDs to valuesdescription(optional): Variable descriptionscopes(optional): Where variable can be applied
- COLOR: Hex string
"#FF0000"or"#FF0000FF"(with alpha) - FLOAT: Number
16or1.5 - STRING: Text
"Hello World" - BOOLEAN:
trueorfalse
figma_update_variable
Update a variable’s value in a specific mode.
When to Use:
- Changing existing token values
- Updating theme-specific values
- Modifying design system tokens
variableId(required): Variable ID to updatemodeId(required): Mode ID to update value invalue(required): New value (format depends on variable type)
figma_rename_variable
Rename a variable while preserving all its values.
When to Use:
- Reorganizing variable naming conventions
- Fixing typos in variable names
- Moving variables to different groups
variableId(required): Variable ID to renamenewName(required): New name (can include/for grouping)
figma_delete_variable
Delete a variable.
When to Use:
- Removing unused tokens
- Cleaning up design system
- Removing deprecated variables
figma_delete_variable_collection
Delete a collection and ALL its variables.
When to Use:
- Removing entire token sets
- Cleaning up unused collections
- Resetting design system sections
figma_add_mode
Add a new mode to an existing collection.
When to Use:
- Adding theme variants (Dark mode, High Contrast)
- Adding responsive breakpoints (Mobile, Tablet, Desktop)
- Adding brand variants
collectionId(required): Collection to add mode tomodeName(required): Name for the new mode
- Updated collection with new mode ID
figma_rename_mode
Rename an existing mode in a collection.
When to Use:
- Fixing mode names
- Updating naming conventions
- Making mode names more descriptive
collectionId(required): Collection containing the modemodeId(required): Mode ID to renamenewName(required): New name for the mode
figma_batch_create_variables
Create multiple variables in a single operation — up to 50x faster than calling figma_create_variable repeatedly.
When to Use:
- Creating multiple design tokens at once (e.g., a full color palette)
- Importing variables from an external source
- Any time you need to create more than 2-3 variables
collectionId(required): Collection ID to create all variables invariables(required): Array of 1-100 variable definitions, each with:name(required): Variable name (use/for grouping)resolvedType(required):"COLOR","FLOAT","STRING", or"BOOLEAN"description(optional): Variable descriptionvaluesByMode(optional): Object mapping mode IDs to values
figma_batch_update_variables
Update multiple variable values in a single operation — up to 50x faster than calling figma_update_variable repeatedly.
When to Use:
- Updating many token values at once (e.g., theme refresh)
- Syncing variable values from an external source
- Any time you need to update more than 2-3 variables
updates(required): Array of 1-100 updates, each with:variableId(required): Variable ID to updatemodeId(required): Mode ID to update value invalue(required): New value (COLOR: hex"#FF0000", FLOAT: number, STRING: text, BOOLEAN: true/false)
figma_setup_design_tokens
Create a complete design token structure in one atomic operation: collection, modes, and all variables.
When to Use:
- Setting up a new design system from scratch
- Importing CSS custom properties or design tokens into Figma
- Creating themed token sets (Light/Dark) with all values at once
- Bootstrapping a new project with a full token foundation
collectionName(required): Name for the new collectionmodes(required): Array of 1-4 mode names (first becomes default)tokens(required): Array of 1-100 token definitions, each with:name(required): Token name (use/for grouping)resolvedType(required):"COLOR","FLOAT","STRING", or"BOOLEAN"description(optional): Token descriptionvalues(required): Object mapping mode names (not IDs) to values
"Light", "Dark") instead of mode ID — the tool resolves names to IDs internally.
Performance: Creates everything in a single Plugin API roundtrip. Ideal for bootstrapping entire token systems.
🧩 Component Tools
⚠️ Requires Desktop Bridge Plugin: These tools require the Desktop Bridge plugin running in Figma. In Local Mode, the plugin connects via WebSocket. In Cloud Mode, pair first using figma_pair_plugin to connect through the cloud relay.
figma_search_components
Search for components by name or description. Supports both local file search and cross-file published library search.
When to Use:
- Finding existing components to instantiate
- Discovering available UI building blocks
- Searching a published design system library from another file
- Checking if a component already exists before creating
query(optional): Search term to match against component names or descriptionscategory(optional): Filter by categorylibraryFileKey(optional): File key of a published library for cross-file searchlibraryFileUrl(optional): URL of a published library file (alternative to libraryFileKey)limit(optional): Max results (default: 10, max: 25)offset(optional): Pagination offset
- Array of matching components with keys, names, variant info, and
source(“local” or “library”)
FIGMA_ACCESS_TOKEN environment variable.
figma_get_library_components
Discover published components from a shared/team library file. This is the primary tool for cross-file design system workflows.
When to Use:
- Browsing all components in a published design system
- Getting component keys for instantiation from another file
- Auditing a library’s component inventory with variant detail
libraryFileUrl(optional): URL of the library filelibraryFileKey(optional): File key of the library filequery(optional): Filter by component name or descriptionlimit(optional): Max results (default: 25, max: 100)offset(optional): Pagination offsetincludeVariants(optional): Include individual variant components (default: false)
- Component sets with variant counts and keys, standalone components, summary stats, and instantiation examples
- Call
figma_get_library_componentswith your design system file - Find the component you want and note its
key - Call
figma_instantiate_componentwith thatcomponentKey— the component is imported from the published library automatically
FIGMA_ACCESS_TOKEN environment variable. Local mode only.
figma_get_component_details
Get detailed information about a specific component.
Usage:
componentKey(required): The component’s key identifier
- Full component details including properties, variants, and metadata
figma_instantiate_component
Create an instance of a component on the canvas.
When to Use:
- Adding existing components to your design
- Building compositions from component library
- Creating layouts using design system components
componentKey(required): Component key to instantiatex(optional): X position on canvasy(optional): Y position on canvasoverrides(optional): Property overrides for the instance
- Created instance with node ID
figma_arrange_component_set
Organize component variants into a professional component set with labels and proper structure.
When to Use:
- After creating multiple component variants
- Organizing messy component sets
- Adding row/column labels to variant grids
- Getting the purple dashed border Figma styling
componentSetId(optional): ID of component set to arrange (uses selection if not provided)componentSetName(optional): Find component set by nameoptions(optional): Layout optionsgap: Gap between grid cells (default: 24)cellPadding: Padding inside each cell (default: 20)columnProperty: Property to use for columns (default: auto-detect, usually “State”)
- Arranged component set with:
- White container frame with title
- Row labels (vertically centered)
- Column headers (horizontally centered)
- Purple dashed border (Figma’s native styling)
figma_set_description
Add or update a description on a component, component set, or style.
When to Use:
- Documenting components for developers
- Adding usage guidelines
- Writing design system documentation
nodeId(required): Node ID of component/style to documentdescription(required): Description text (supports markdown)
- Confirmation with updated node info
🔧 Node Manipulation Tools
figma_resize_node
Resize a node to specific dimensions.
Usage:
figma_move_node
Move a node to a specific position.
Usage:
figma_clone_node
Create a copy of a node.
Usage:
- New node ID of the clone
figma_delete_node
Delete a node from the canvas.
Usage:
figma_rename_node
Rename a node.
Usage:
figma_set_text
Set the text content of a text node.
Usage:
figma_set_fills
Set the fill colors of a node.
Usage:
figma_set_strokes
Set the stroke colors of a node.
Usage:
figma_create_child
Create a child node inside a parent.
Usage:
🏷️ Component Property Tools
figma_add_component_property
Add a new property to a component.
Usage:
nodeId(required): Component node IDpropertyName(required): Name for the new propertypropertyType(required):"BOOLEAN","TEXT","INSTANCE_SWAP", or"VARIANT"defaultValue(required): Default value for the property
figma_edit_component_property
Edit an existing component property.
Usage:
figma_delete_component_property
Remove a property from a component.
Usage:
📦 Design System Kit
figma_get_design_system_kit
Extract your entire design system — tokens, components, and styles — in a single call. This is the preferred tool for design system extraction, replacing separate calls to figma_get_variables, figma_get_component, and figma_get_styles.
Returns component visual specs (exact colors, padding, typography, layout), rendered screenshots, token values per mode (light/dark), and resolved style values. Ideal for AI code generation — the visualSpec data provides pixel-accurate reproduction data.
Available in both Local and Remote modes.
Usage:
| Parameter | Type | Default | Description |
|---|---|---|---|
fileKey | string | (current file) | Figma file key. If omitted, extracted from the current browser URL. |
include | array | ["tokens", "components", "styles"] | Which sections to include. |
componentIds | array | (all) | Specific component node IDs to include. If omitted, all published components are returned. |
includeImages | boolean | false | Include image URLs for components (adds latency). |
format | "full" | "summary" | "compact" | "full" | Response detail level. |
full— Complete data with visual specs and resolved style values. Best for implementing specific components.summary— Strips variant-level visual specs (medium payload). Good for overview + a few deep-dives.compact— Only names, types, and property definitions. Best for large design systems or getting an inventory.
tokens— Variables grouped by collection, with full mode support (light/dark/etc.)components— Published components with property definitions, variant specs, and visual specs (fills, strokes, effects, corner radius, layout, typography)styles— Color, text, and effect styles with resolved valuesai_instruction— Guidance for the AI on how to use the extracted dataerrors— Any sections that failed to extract (partial results are still returned)
📊 Design System Summary Tools
figma_get_design_system_summary
Get a high-level overview of the design system in the current file.
Usage:
- Component count and categories
- Variable collections and counts
- Style summary (colors, text, effects)
- Page structure overview
figma_get_token_values
Get all variable values organized by collection and mode.
Usage:
- Variables organized by collection
- Values for each mode
- Variable metadata
AI Decision Guide: Which Tool to Use?
For Design System Extraction
| Task | Tool |
|---|---|
| Get everything at once (tokens + components + styles) | figma_get_design_system_kit |
| Get only tokens/variables | figma_get_design_system_kit with include: ["tokens"] |
| Get only components with visual specs | figma_get_design_system_kit with include: ["components"] |
| Get variables with multi-format export (CSS, Tailwind, Sass) | figma_get_variables |
| Get a quick overview (counts, categories) | figma_get_design_system_summary |
| Feed a design system to an AI code generator | figma_get_design_system_kit |
Tip: Preferfigma_get_design_system_kitover callingfigma_get_variables,figma_get_component, andfigma_get_stylesseparately. It returns all three in a single optimized call with visual specs and resolved values.
For Design Creation
| Task | Tool | Example |
|---|---|---|
| Create UI components | figma_execute | Buttons, cards, modals |
| Create frames/layouts | figma_execute | Auto-layout containers |
| Add text | figma_execute | Labels, headings, paragraphs |
| Create shapes | figma_execute | Icons, decorations |
| Modify existing elements | figma_execute | Change colors, resize |
| Create pages | figma_execute | Organize file structure |
For Variable Management
| Task | Tool |
|---|---|
| Create new token collection | figma_create_variable_collection |
| Add a single design token | figma_create_variable |
| Add multiple design tokens (3+) | figma_batch_create_variables |
| Change a single token value | figma_update_variable |
| Change multiple token values (3+) | figma_batch_update_variables |
| Set up a full token system from scratch | figma_setup_design_tokens |
| Reorganize token names | figma_rename_variable |
| Remove tokens | figma_delete_variable |
| Add themes (Light/Dark) | figma_add_mode |
| Rename themes | figma_rename_mode |
For Design-Code Parity
| Task | Tool |
|---|---|
| Compare Figma specs against code | figma_check_design_parity |
| Generate component documentation | figma_generate_component_doc |
| Audit component before sign-off | figma_check_design_parity |
| Create design system reference docs | figma_generate_component_doc |
| Notify designers of parity drift | figma_post_comment |
| Review existing feedback threads | figma_get_comments |
| Clean up resolved feedback | figma_delete_comment |
Prerequisites Checklist
Before using write tools, ensure one of the following: Local Mode:- ✅ Running in Local Mode (NPX/Git)
- ✅ Desktop Bridge plugin is running in your Figma file
- ✅
figma_get_statusreturnssetup.valid: true
- ✅ Desktop Bridge plugin is running in your Figma file with Cloud Mode enabled
- ✅ Paired via
figma_pair_plugin(or natural language: “connect to my Figma plugin”)
🔍 Design-Code Parity Tools
figma_check_design_parity
Compare a Figma component’s design specs against your code implementation. Produces a scored parity report with actionable fix items.
When to Use:
- Before sign-off on a component implementation
- During design system audits to catch drift between design and code
- To verify that code accurately reflects the design spec
fileUrl(optional): Figma file URL (uses current URL if omitted)nodeId(required): Component node IDcodeSpec(required): Structured code-side data with sections:visual: backgroundColor, borderColor, borderRadius, opacity, shadow, etc.spacing: paddingTop/Right/Bottom/Left, gap, width, height, minWidth, maxWidthtypography: fontFamily, fontSize, fontWeight, lineHeight, letterSpacing, colortokens: usedTokens array, hardcodedValues array, tokenCoverage percentagecomponentAPI: props array (name, type, required, defaultValue, description)accessibility: role, ariaLabel, keyboardInteraction, focusManagement, contrastRatiometadata: name, filePath, version, status, tags, description
canonicalSource(optional): Which source is truth —"design"(default) or"code"enrich(optional): Enable token/enrichment analysis (default: true)
summary: Total discrepancies, parity score (0-100), counts by severity (critical/major/minor/info), categories breakdowndiscrepancies: Array of property mismatches with category, severity, design value, code value, and suggestionactionItems: Structured fix instructions specifying which side to fix, which Figma tool or code change to applydesignData: Raw Figma data extracted from the component (fills, strokes, spacing, properties)codeData: The codeSpec as providedai_instruction: Structured presentation guide for consistent report formatting
score = max(0, 100 - (critical×15 + major×8 + minor×3 + info×1))
COMPONENT_SET Handling:
When given a COMPONENT_SET node, the tool automatically resolves to the default variant (first child) for visual comparisons (fills, strokes, spacing, typography). Component property definitions and naming are read from the COMPONENT_SET itself.
figma_generate_component_doc
Generate platform-agnostic markdown documentation for a component by merging Figma design data with code-side info. Output is compatible with Docusaurus, Mintlify, ZeroHeight, Knapsack, Supernova, and any markdown-based docs platform.
When to Use:
- Generating design system component documentation
- Creating developer handoff documentation
- Building a component reference library
fileUrl(optional): Figma file URL (uses current URL if omitted)nodeId(required): Component node IDcodeInfo(optional): Code-side documentation info. Read the component source code first, then fill in relevant sections:importStatement: Import pathfilePath: Component file pathpackageName: Package nameprops: Array of prop definitions (name, type, required, defaultValue, description)events: Array of event definitions (name, payload, description)slots: Array of slot/sub-component definitions (name, description)usageExamples: Array of code examples (title, code, language)changelog: Version history entries (version, date, changes)variantDefinition: CVA or variant definition code block (rendered in Implementation section)subComponents: Array of composable sub-parts (name, description, element, dataSlot, props)sourceFiles: Array of related files (path, role, variants, description) — used for Source Files table and Storybook link detectionbaseComponent: Base component attribution (name, url, description) — e.g., “Built on shadcn/ui Alert”
sections(optional): Toggle individual sections on/off (overview, statesAndVariants, visualSpecs, implementation, accessibility, changelog)outputPath(optional): Suggested file path for savingsystemName(optional): Design system name for documentation headersenrich(optional): Enable enrichment analysis (default: true)includeFrontmatter(optional): Include YAML frontmatter metadata (default: true)
componentName: Resolved component namemarkdown: Complete markdown documentation with frontmatter, overview, states & variants, visual specs, implementation, accessibility sectionsincludedSections: Which sections were generateddataSourceSummary: What data sources were available (Figma enriched, code info, variables, styles)suggestedOutputPath: Where to save the fileai_instruction: Guidance for the AI on next steps (saving file, asking user for path)
💬 Comment Tools
figma_get_comments
Get comments on a Figma file. Returns comment threads with author, message, timestamps, and pinned node locations.
When to Use:
- Reviewing feedback threads on a design file
- Checking for open comments before a release
- Retrieving comment IDs to reply to or delete
fileUrl(optional): Figma file URL (uses current URL if omitted)as_md(optional): Return comment message bodies as markdown (default: false)include_resolved(optional): Include resolved comment threads (default: false)
comments: Array of comment objects withid,message,user,created_at,resolved_at,client_meta(pinned location)summary: Total, active, resolved, and returned counts
figma_post_comment
Post a comment on a Figma file, optionally pinned to a specific design node. Supports replies to existing threads.
When to Use:
- After
figma_check_design_parityto notify designers of drift - Leaving feedback on specific components or elements
- Replying to an existing comment thread
fileUrl(optional): Figma file URL (uses current URL if omitted)message(required): The comment message textnode_id(optional): Node ID to pin the comment to (e.g.,'695:313')x(optional): X offset for comment placement relative to the nodey(optional): Y offset for comment placement relative to the nodereply_to_comment_id(optional): ID of an existing comment to reply to
comment: Created comment object withid,message,created_at,user,client_meta
figma_delete_comment
Delete a comment from a Figma file by its comment ID.
When to Use:
- Cleaning up test or outdated comments
- Removing resolved feedback after fixes are confirmed
- Managing comment threads programmatically
fileUrl(optional): Figma file URL (uses current URL if omitted)comment_id(required): The ID of the comment to delete (get IDs fromfigma_get_comments)
success: Boolean indicating deletion successdeleted_comment_id: The ID that was deleted
🖼️ Image Tools
figma_set_image_fill
Set an image fill on one or more Figma nodes. Accepts base64-encoded image data or (in Local Mode) an absolute file path.
Mode: Local / Cloud
When to Use:
- Applying photos, illustrations, or textures to frames and shapes
- Setting hero images, avatars, or background images
- Replacing placeholder images with real assets
nodeIds(required): Array of node IDs to apply the image fill toimageData(required): Base64-encoded image data (JPEG/PNG), or an absolute file path starting with/(Local Mode only)scaleMode(optional): How the image fills the node —"FILL"(default),"FIT","CROP", or"TILE"
imageHash: Figma’s internal hash for the created imageupdatedCount: Number of nodes successfully updatednodes: Array of updated node IDs and names
🔍 Design Lint Tool
figma_lint_design
Run accessibility (WCAG) and design quality checks on the current page or a specific node tree. Returns categorized findings with severity levels.
Mode: Local / Cloud
When to Use:
- Checking designs for WCAG accessibility compliance
- Finding hardcoded colors that should use design tokens
- Detecting detached components in your file
- Auditing naming conventions and layout quality
- Pre-handoff quality checks
nodeId(optional): Node ID to lint (defaults to current page)rules(optional): Rule filter —["all"](default),["wcag"],["design-system"],["layout"], or specific rule IDsmaxDepth(optional): Maximum tree depth to traverse (default: 10)maxFindings(optional): Maximum findings before stopping (default: 100)
| Group | Rules | What It Checks |
|---|---|---|
wcag | wcag-contrast, wcag-text-size, wcag-target-size, wcag-line-height | WCAG accessibility compliance |
design-system | hardcoded-color, no-text-style, default-name, detached-component | Design system hygiene |
layout | no-autolayout, empty-container | Layout quality |
| Rule | Severity | Description |
|---|---|---|
wcag-contrast | critical | Text foreground/background contrast ratio below WCAG AA (4.5:1 normal, 3:1 large text) |
wcag-text-size | warning | Text nodes with font size below 12px |
wcag-target-size | critical | Interactive elements (buttons, inputs, etc.) smaller than 24x24px |
wcag-line-height | warning | Line height below 1.5x the font size (supports pixel and percent values) |
hardcoded-color | warning | Solid fills not bound to a variable or paint style |
no-text-style | warning | Text nodes without an applied text style |
default-name | warning | Nodes with generic Figma names (Frame 1, Rectangle 3, etc.) |
detached-component | warning | Frames with component naming convention (contains ”/”) but not actually a component or instance |
no-autolayout | warning | Frames with 2+ children that don’t use auto-layout |
empty-container | info | Frames with zero children |
- “Check my design for accessibility issues”
- “Lint this page”
- “Find hardcoded colors”
- “Are there any detached components?”
- “Run a WCAG contrast check”
- “Audit the design quality”
☁️ Cloud Relay
figma_pair_plugin
Generate a pairing code to connect the Figma Desktop Bridge plugin to the cloud relay. This enables write operations from web-based AI clients.
Mode: Cloud only (available on /mcp endpoint)
Parameters: None
Returns:
code— 6-character alphanumeric pairing code (uppercase, no ambiguous characters)expiresIn— Expiry time (5 minutes)- Instructions for the user
- “Connect to my Figma plugin”
- “Pair with my design file”
- “Set up the cloud connection”
- “Link Figma to this chat”
- Generates a unique 6-character code stored in KV with 5-minute TTL
- User enters code in the Desktop Bridge plugin’s Cloud Mode section
- Plugin connects via WebSocket to the cloud relay Durable Object
- All subsequent write tool calls route through the relay to the plugin
Error Handling
All tools return structured error responses:"FIGMA_ACCESS_TOKEN not configured"- Set up your token (see installation guide)"Failed to connect to browser"- Browser initializing or connection issue"Invalid Figma URL"- Check URL format"Node not found"- Verify node ID is correct"Desktop Bridge plugin not found"- Ensure plugin is running in Figma"Invalid hex color"- Check hex format (use #RGB, #RGBA, #RRGGBB, or #RRGGBBAA)