figma-console-mcp
v0.6.7The most comprehensive MCP server for Figma — design tokens, variables, components, write tools, version history diff, accessibility audits, FigJam, Slides…
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
figma_get_console_logs
Retrieve console logs from Figma Desktop. FOR PLUGIN DEVELOPERS: This works immediately - no navigation needed! Just check logs, run your plugin in Figma Desktop, check logs again. All plugin logs ([Main], [Swapper], etc.) appear instantly.
| Parameter | Type | Description |
|---|---|---|
count | number | Number of recent logs to retrieve |
level | string | Filter by log level |
since | number | Only logs after this timestamp (Unix ms) |
figma_take_screenshot
Export an image of the current Figma page or specific node. Uses the Toko Relay plugin (exportAsync) when connected — works on any plan, no REST token needed, reflects current runtime state. Falls back to the Figma REST API when the bridge is unavailable or for PDF format. Use for visual validation after design changes — check alignment, spacing, proportions. Pass nodeId to target specific elements. For components, prefer figma_get_component_image.
| Parameter | Type | Description |
|---|---|---|
format | string | Image format (default: png) |
nodeId | string | Optional node ID to screenshot (e.g., '123:456'). If omitted, uses the node-id from the Toko Relay plugin's reported file URL when present. To screenshot what the user is currently looking at on the c… |
scale | number | Image scale factor (0.01-4, default: 2 for high quality) |
figma_watch_console
Stream console logs in real-time for a specified duration (max 5 minutes). Use for monitoring plugin execution while user tests manually. Returns all logs captured during watch period with summary statistics. NOT for retrieving past logs (use figma_get_console_logs). Best for: watching plugin output during manual testing, debugging race conditions, monitoring async operations.
| Parameter | Type | Description |
|---|---|---|
duration | number | How long to watch in seconds |
level | string | Filter by log level |
figma_reload_plugin
Reload the current Figma page/plugin to test code changes. Optionally clears console logs before reload. Use when user says: 'reload plugin', 'refresh page', 'restart plugin', 'test my changes'. Returns reload confirmation and current URL. Best for rapid iteration during plugin development.
| Parameter | Type | Description |
|---|---|---|
clearConsole | boolean | Clear console logs before reload |
figma_clear_console
Clear the console log buffer. Safely clears the buffer without disrupting the connection. Returns number of logs cleared.
figma_get_status
Check connection status to Figma Desktop. Reports transport status and connection health via the Toko Relay plugin (WebSocket transport). Use probe:true for an active roundtrip verification that the plugin is actually responding.
| Parameter | Type | Description |
|---|---|---|
probe | boolean | When true, sends a live roundtrip command to the plugin to verify the connection is actually responsive (not just TCP-open). Returns probeResult with success/latency. Recommended for health checks. |
figma_reconnect
Force a complete reconnection to Figma Desktop. Use when connection seems stale or after switching files.
figma_get_selection
Get the currently selected nodes in Figma. Returns node IDs, names, types, and dimensions. WebSocket-only — requires the Toko Relay plugin. Use this to understand what the user is pointing at instead of asking them to describe it.
| Parameter | Type | Description |
|---|---|---|
verbose | boolean | If true, fetches additional details (fills, strokes, styles) for each selected node via figma_execute |
figma_get_design_changes
Get recent document changes detected in Figma. Returns buffered change events including which nodes changed, whether styles were modified, and change counts. WebSocket-only — events are captured via the Toko Relay plugin. Use this to understand what changed since you last checked.
| Parameter | Type | Description |
|---|---|---|
clear | boolean | Clear the change buffer after reading. Set to true for polling workflows. |
count | number | Maximum number of change events to return (chronological order, oldest to newest; returns the last N events) |
since | number | Only return changes after this Unix timestamp (ms). Useful for incremental polling. |
figma_list_open_files
List all Figma files currently connected via the Toko Relay plugin. Shows which files have the plugin open and which one is the active target for tool calls. Use figma_navigate to switch between files. WebSocket multi-client mode — each file with the Toko Relay plugin maintains its own connection.
figma_get_design_system_summary
Get a compact overview of the design system. Returns categories, component counts, and token collection names WITHOUT full details. Use this first to understand what's available, then use figma_search_components to find specific components. This tool is optimized for minimal token usage.
| Parameter | Type | Description |
|---|---|---|
forceRefresh | boolean | Force refresh the cached data (use sparingly - extraction can take minutes for large files) |
figma_search_components
Search for components by name, category, or description. Returns paginated results with component keys for instantiation. Automatically loads the design system cache if needed. **NEW: Cross-file library search!** Pass a libraryFileKey or libraryFileUrl to search for components in a published shared library (different file). This uses the REST API and requires FIGMA_ACCESS_TOKEN. Without libraryFileKey/libraryFileUrl, searches the currently open file (local components via Plugin API).
| Parameter | Type | Description |
|---|---|---|
category | string | Filter by category (e.g., 'Button', 'Input', 'Card') |
libraryFileKey | string | File key of a published library to search in (for cross-file library access). Overrides local search. |
libraryFileUrl | string | URL of a published library file to search in (e.g., https://www.figma.com/design/abc123/...). Alternative to libraryFileKey. |
limit | number | Maximum results to return (default: 10, max: 25) |
offset | number | Offset for pagination |
query | string | Search query to match component names or descriptions |
figma_get_component_details
Get full details for a specific component including all variants, properties, and keys needed for instantiation. Use the component key or name from figma_search_components.
| Parameter | Type | Description |
|---|---|---|
componentKey | string | The component key (preferred for exact match) |
componentName | string | The component name (used if key not provided) |
figma_get_token_values
Get actual values for design tokens (colors, spacing, etc). Use after figma_get_design_system_summary to get specific token values for implementation.
| Parameter | Type | Description |
|---|---|---|
filter | string | Filter token names (e.g., 'primary' to get all primary colors) |
limit | number | Maximum tokens to return (default: 50) |
type | string | Type of tokens to retrieve |
figma_get_library_components
Discover published components from a shared/team library file. **USE THIS when you need to use components from a published design system library** (a different file than the one currently open). This bridges the gap between library discovery and instantiation. **WORKFLOW:** 1. Call this tool with the library file's URL or file key 2. Browse the returned components — results include COMPONENT_SET (with variants array) and standalone COMPONENT types 3. Use figma_instantiate_component with a VARIANT key (from the variants array inside a COMPONENT_SET result, NOT the component set key itself)…
| Parameter | Type | Description |
|---|---|---|
includeVariants | boolean | Include individual variant components (default: false, only returns component sets) |
libraryFileKey | string | The file key of the library file (e.g., 'abc123'). Either this or libraryFileUrl is required. |
libraryFileUrl | string | The URL of the library file (e.g., https://www.figma.com/design/abc123/My-Design-System). Either this or libraryFileKey is required. |
limit | number | Maximum results to return (default: 25, max: 100) |
offset | number | Offset for pagination |
query | string | Search query to filter components by name (e.g., 'Button', 'Card'). Leave empty to get all components. |
figma_execute
Execute arbitrary JavaScript in Figma's plugin context with full access to the figma API. Use for complex operations not covered by other tools. Requires the Toko Relay plugin. CAUTION: Can modify your document. **COMPONENT INSTANCES:** For instances (node.type === 'INSTANCE'), use figma_set_instance_properties — direct text editing FAILS SILENTLY. Check instance.componentProperties for available props (may have #nodeId suffixes). **RESULT ANALYSIS:** Check resultAnalysis.warning for silent failures (empty arrays, null returns). **VALIDATION:** After creating/modifying visuals: screenshot…
| Parameter | Type | Description |
|---|---|---|
code * | string | JavaScript code to execute. Has access to the 'figma' global object. Example: 'const rect = figma.createRectangle(); rect.resize(100, 100); return { id: rect.id };' |
fileKey | string | Run in this file (its fileKey, as figma_list_open_files reports it) instead of the active file. Fails if the Toko Relay plugin is not connected in that file; never falls back to the active file. Ignor… |
timeout | number | Execution timeout in milliseconds (default: 5000, max: 30000) |
figma_update_variable
Update a single variable's value and/or its description. Pass modeId+value to change the value in a mode; pass description to set the 'How to use this variable' text shown in the Variables panel (and exported as DTCG $description). At least one of {modeId+value} or {description} is required. For many value updates at once, use figma_batch_update_variables (10-50x faster). Use figma_get_variables first for IDs. COLOR: hex '#FF0000', FLOAT: number, STRING: text, BOOLEAN: true/false. Requires the Toko Relay plugin.
| Parameter | Type | Description |
|---|---|---|
variableId * | string | The variable ID to update (e.g., 'VariableID:123:456'). Get this from figma_get_variables. |
description | string | Set the variable's description (the 'How to use this variable' field; exported as DTCG $description). Pass an empty string to clear it. |
fileKey | string | Run in this file (its fileKey, as figma_list_open_files reports it) instead of the active file. Fails if the Toko Relay plugin is not connected in that file; never falls back to the active file. Ignor… |
modeId | string | The mode ID to update the value in (e.g., '1:0'). Required when updating a value. Get this from the variable's collection modes. |
value | The new value (requires modeId). For COLOR: hex string like '#FF0000'. For FLOAT: number. For STRING: text. For BOOLEAN: true/false. To alias another variable, pass { type: 'VARIABLE_ALIAS', id: 'Vari… |
figma_create_variable
Create a single Figma variable. For multiple variables, use figma_batch_create_variables instead (10-50x faster). Use figma_get_variables first to get collection IDs. Supports COLOR, FLOAT, STRING, BOOLEAN. Requires the Toko Relay plugin.
| Parameter | Type | Description |
|---|---|---|
collectionId * | string | The collection ID to create the variable in (e.g., 'VariableCollectionId:123:456'). Get this from figma_get_variables. |
name * | string | Name for the new variable (e.g., 'primary-blue') |
resolvedType * | string | The variable type: COLOR, FLOAT, STRING, or BOOLEAN |
description | string | Optional description for the variable |
fileKey | string | Run in this file (its fileKey, as figma_list_open_files reports it) instead of the active file. Fails if the Toko Relay plugin is not connected in that file; never falls back to the active file. Ignor… |
valuesByMode | object | Optional initial values by mode ID. Example: { '1:0': '#FF0000', '1:1': '#0000FF' }. To alias another variable, pass { type: 'VARIABLE_ALIAS', id: 'VariableID:…' }. This tool never treats a 'Variabl… |
figma_create_variable_collection
Create an empty variable collection. To create a collection WITH variables and modes in one step, use figma_setup_design_tokens instead. Requires the Toko Relay plugin.
| Parameter | Type | Description |
|---|---|---|
name * | string | Name for the new collection (e.g., 'Brand Colors') |
additionalModes | array | Additional mode names to create. Example: ['Dark', 'High Contrast'] |
fileKey | string | Run in this file (its fileKey, as figma_list_open_files reports it) instead of the active file. Fails if the Toko Relay plugin is not connected in that file; never falls back to the active file. Ignor… |
initialModeName | string | Name for the initial mode (default mode is created automatically). Example: 'Light' |
figma_delete_variable
Delete a Figma variable. WARNING: This is a destructive operation that cannot be undone (except with Figma's undo). Use figma_get_variables first to get variable IDs. Requires the Toko Relay plugin to be running.
| Parameter | Type | Description |
|---|---|---|
variableId * | string | The variable ID to delete (e.g., 'VariableID:123:456'). Get this from figma_get_variables. |
fileKey | string | Run in this file (its fileKey, as figma_list_open_files reports it) instead of the active file. Fails if the Toko Relay plugin is not connected in that file; never falls back to the active file. Ignor… |
figma_delete_variable_collection
Delete a Figma variable collection and ALL its variables. WARNING: This is a destructive operation that deletes all variables in the collection and cannot be undone (except with Figma's undo). Requires the Toko Relay plugin to be running.
| Parameter | Type | Description |
|---|---|---|
collectionId * | string | The collection ID to delete (e.g., 'VariableCollectionId:123:456'). Get this from figma_get_variables. |
fileKey | string | Run in this file (its fileKey, as figma_list_open_files reports it) instead of the active file. Fails if the Toko Relay plugin is not connected in that file; never falls back to the active file. Ignor… |
figma_rename_variable
Rename an existing Figma variable. This updates the variable's name while preserving all its values and settings. Requires the Toko Relay plugin to be running.
| Parameter | Type | Description |
|---|---|---|
newName * | string | The new name for the variable. Can include slashes for grouping (e.g., 'colors/primary/background'). |
variableId * | string | The variable ID to rename (e.g., 'VariableID:123:456'). Get this from figma_get_variables. |
fileKey | string | Run in this file (its fileKey, as figma_list_open_files reports it) instead of the active file. Fails if the Toko Relay plugin is not connected in that file; never falls back to the active file. Ignor… |
figma_add_mode
Add a new mode to an existing Figma variable collection. Modes allow variables to have different values for different contexts (e.g., Light/Dark themes, device sizes). Requires the Toko Relay plugin to be running.
| Parameter | Type | Description |
|---|---|---|
collectionId * | string | The collection ID to add the mode to (e.g., 'VariableCollectionId:123:456'). Get this from figma_get_variables. |
modeName * | string | The name for the new mode (e.g., 'Dark', 'Mobile', 'High Contrast'). |
fileKey | string | Run in this file (its fileKey, as figma_list_open_files reports it) instead of the active file. Fails if the Toko Relay plugin is not connected in that file; never falls back to the active file. Ignor… |
figma_rename_mode
Rename an existing mode in a Figma variable collection. Requires the Toko Relay plugin to be running.
| Parameter | Type | Description |
|---|---|---|
collectionId * | string | The collection ID containing the mode (e.g., 'VariableCollectionId:123:456'). Get this from figma_get_variables. |
modeId * | string | The mode ID to rename (e.g., '123:0'). Get this from the collection's modes array in figma_get_variables. |
newName * | string | The new name for the mode (e.g., 'Dark Theme', 'Tablet'). |
fileKey | string | Run in this file (its fileKey, as figma_list_open_files reports it) instead of the active file. Fails if the Toko Relay plugin is not connected in that file; never falls back to the active file. Ignor… |
figma_batch_create_variables
Create multiple variables in one operation. Use instead of calling figma_create_variable repeatedly — up to 50x faster for bulk operations. Get collection IDs from figma_get_variables first. Requires the Toko Relay plugin.
| Parameter | Type | Description |
|---|---|---|
collectionId * | string | Collection ID to create all variables in (e.g., 'VariableCollectionId:123:456') |
variables * | array | Array of variables to create (1-100) |
fileKey | string | Run in this file (its fileKey, as figma_list_open_files reports it) instead of the active file. Fails if the Toko Relay plugin is not connected in that file; never falls back to the active file. Ignor… |
figma_batch_update_variables
Update multiple variable values in one operation. Use instead of calling figma_update_variable repeatedly — up to 50x faster for bulk updates. Get variable/mode IDs from figma_get_variables first. Requires the Toko Relay plugin.
| Parameter | Type | Description |
|---|---|---|
updates * | array | Array of updates to apply (1-100) |
fileKey | string | Run in this file (its fileKey, as figma_list_open_files reports it) instead of the active file. Fails if the Toko Relay plugin is not connected in that file; never falls back to the active file. Ignor… |
figma_setup_design_tokens
Create a complete design token structure in one operation: collection, modes, and all variables. Ideal for importing CSS custom properties or design tokens into Figma. Values may be literals OR DTCG-style brace references ('{color.blue.600}', or set-qualified '{primitives.color.blue.600}') that resolve to variable ALIASES — first against variables created in this same call, then against existing local variables. Unresolvable references skip that value with a per-item warning (the rest of the batch still applies), so semantic collections referencing primitives no longer need raw figma_execute…
| Parameter | Type | Description |
|---|---|---|
collectionName * | string | Name for the token collection (e.g., 'Brand Tokens') |
modes * | array | Mode names (first becomes default). Example: ['Light', 'Dark']. Your Figma plan's per-collection mode limit applies at RUNTIME (e.g. Professional 10, Organization 20) — exceeding it fails cleanly wi… |
tokens * | array | Token definitions (1-100) |
fileKey | string | Run in this file (its fileKey, as figma_list_open_files reports it) instead of the active file. Fails if the Toko Relay plugin is not connected in that file; never falls back to the active file. Ignor… |
figma_instantiate_component
Create an instance of a component from the design system. **CRITICAL: Always pass BOTH componentKey AND nodeId together!** Search results return both identifiers. Pass both so the tool can automatically fall back to nodeId if the component isn't published to a library. Most local/unpublished components require nodeId. **IMPORTANT: Always re-search before instantiating!** NodeIds are session-specific and may be stale from previous conversations. ALWAYS search for components at the start of each design session to get current, valid identifiers. **VISUAL VALIDATION WORKFLOW:** After instantiat…
| Parameter | Type | Description |
|---|---|---|
componentKey | string | The component key from search results. Pass this WITH nodeId for automatic fallback. |
fileKey | string | Run in this file (its fileKey, as figma_list_open_files reports it) instead of the active file. Fails if the Toko Relay plugin is not connected in that file; never falls back to the active file. Ignor… |
nodeId | string | The node ID from search results. ALWAYS pass this alongside componentKey - most local components need it. |
overrides | object | Property overrides (e.g., { 'Button Label': 'Click Me' }) |
parentId | string | Parent node ID to append the instance to |
position | object | Position on canvas (default: 0, 0) |
variant | object | Variant properties to set (e.g., { Type: 'Simple', State: 'Active' }) |
figma_set_description
Set the description text on a component, component set, or style. Descriptions appear in Dev Mode and help document design intent. Supports plain text and markdown formatting.
| Parameter | Type | Description |
|---|---|---|
description * | string | The plain text description to set |
nodeId * | string | The node ID of the component or style to update (e.g., '123:456') |
descriptionMarkdown | string | Optional rich text description using markdown formatting |
fileKey | string | Run in this file (its fileKey, as figma_list_open_files reports it) instead of the active file. Fails if the Toko Relay plugin is not connected in that file; never falls back to the active file. Ignor… |
figma_add_component_property
Add a new component property to a component or component set. Properties enable dynamic content and behavior in component instances. Supported types: BOOLEAN (toggle), TEXT (string), INSTANCE_SWAP (component swap), VARIANT (variant selection), SLOT (freeform slot — prefer figma_create_slot for new slots).
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | The component or component set node ID |
propertyName * | string | Name for the new property (e.g., 'Show Icon', 'Button Label', 'Content') |
type * | string | Property type: BOOLEAN for toggles, TEXT for strings, INSTANCE_SWAP for component swaps, VARIANT for variant selection, SLOT for freeform slot areas |
defaultValue | string | number | boolean | Default value. Required for TEXT (string), INSTANCE_SWAP (component id), and VARIANT (a non-empty variant option name — Figma rejects empty). Optional for BOOLEAN (defaults false). Omit for SLOT. |
description | string | Property description (SLOT properties only) |
fileKey | string | Run in this file (its fileKey, as figma_list_open_files reports it) instead of the active file. Fails if the Toko Relay plugin is not connected in that file; never falls back to the active file. Ignor… |
preferredValues | array | Preferred components (INSTANCE_SWAP and SLOT only) |
figma_edit_component_property
Edit an existing component property. Can change the name, default value, or preferred values (for INSTANCE_SWAP). Use the full property name including the unique suffix.
| Parameter | Type | Description |
|---|---|---|
newValue * | object | Object with the values to update |
nodeId * | string | The component or component set node ID |
propertyName * | string | The full property name with suffix (e.g., 'Show Icon#123:456') |
fileKey | string | Run in this file (its fileKey, as figma_list_open_files reports it) instead of the active file. Fails if the Toko Relay plugin is not connected in that file; never falls back to the active file. Ignor… |
figma_delete_component_property
Delete a component property. Works with BOOLEAN, TEXT, INSTANCE_SWAP, and SLOT properties (not VARIANT). This is a destructive operation.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | The component or component set node ID |
propertyName * | string | The full property name with suffix (e.g., 'Show Icon#123:456') |
fileKey | string | Run in this file (its fileKey, as figma_list_open_files reports it) instead of the active file. Fails if the Toko Relay plugin is not connected in that file; never falls back to the active file. Ignor… |
figma_resize_node
Resize a node to specific dimensions. By default respects child constraints; use withConstraints=false to ignore them.
| Parameter | Type | Description |
|---|---|---|
height * | number | New height in pixels |
nodeId * | string | The node ID to resize |
width * | number | New width in pixels |
fileKey | string | Run in this file (its fileKey, as figma_list_open_files reports it) instead of the active file. Fails if the Toko Relay plugin is not connected in that file; never falls back to the active file. Ignor… |
withConstraints | boolean | Whether to apply child constraints during resize (default: true) |
figma_move_node
Move a node to a new position within its parent.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | The node ID to move |
x * | number | New X position |
y * | number | New Y position |
fileKey | string | Run in this file (its fileKey, as figma_list_open_files reports it) instead of the active file. Fails if the Toko Relay plugin is not connected in that file; never falls back to the active file. Ignor… |
figma_set_fills
Set the fill colors on a node. Accepts hex color strings (e.g., '#FF0000'). To bind a fill to a design token / color variable, pass that fill's variableId — the variable drives the color and this works on any Figma plan via the bridge (no raw figma_execute needed).
| Parameter | Type | Description |
|---|---|---|
fills * | array | Array of fill objects |
nodeId * | string | The node ID to modify |
fileKey | string | Run in this file (its fileKey, as figma_list_open_files reports it) instead of the active file. Fails if the Toko Relay plugin is not connected in that file; never falls back to the active file. Ignor… |
figma_set_image_fill
Set an image fill on one or more Figma nodes. The imageData parameter accepts a base64-encoded image string (JPEG/PNG). The image is decoded in the browser bridge and passed as raw bytes to the Figma plugin. Requires the Toko Relay plugin.
| Parameter | Type | Description |
|---|---|---|
imageData * | string | Base64-encoded image data (JPEG/PNG) |
nodeIds * | array | Array of node IDs to apply the image fill to |
fileKey | string | Run in this file (its fileKey, as figma_list_open_files reports it) instead of the active file. Fails if the Toko Relay plugin is not connected in that file; never falls back to the active file. Ignor… |
scaleMode | string | How the image fills the node (default: FILL) |
figma_set_strokes
Set the stroke (border) on a node. Accepts hex color strings and optional stroke weight. To bind a stroke to a design token / color variable, pass that stroke's variableId — works on any Figma plan via the bridge.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | The node ID to modify |
strokes * | array | Array of stroke objects |
fileKey | string | Run in this file (its fileKey, as figma_list_open_files reports it) instead of the active file. Fails if the Toko Relay plugin is not connected in that file; never falls back to the active file. Ignor… |
strokeWeight | number | Stroke thickness in pixels |
figma_clone_node
Duplicate a node. The clone is placed at a slight offset from the original.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | The node ID to clone |
fileKey | string | Run in this file (its fileKey, as figma_list_open_files reports it) instead of the active file. Fails if the Toko Relay plugin is not connected in that file; never falls back to the active file. Ignor… |
figma_delete_node
Delete a node from the canvas. WARNING: This is a destructive operation (can be undone with Figma's undo).
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | The node ID to delete |
fileKey | string | Run in this file (its fileKey, as figma_list_open_files reports it) instead of the active file. Fails if the Toko Relay plugin is not connected in that file; never falls back to the active file. Ignor… |
figma_rename_node
Rename a node in the layer panel.
| Parameter | Type | Description |
|---|---|---|
newName * | string | The new name for the node |
nodeId * | string | The node ID to rename |
fileKey | string | Run in this file (its fileKey, as figma_list_open_files reports it) instead of the active file. Fails if the Toko Relay plugin is not connected in that file; never falls back to the active file. Ignor… |
figma_set_text
Set the text content of a text node. Optionally adjust font size and the font family/style. Font style names are space-sensitive ('Semi Bold', not 'SemiBold'), but this tool auto-corrects common no-space variants and falls back gracefully — so you don't need raw figma_execute to change typography.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | The text node ID |
text * | string | The new text content |
fileKey | string | Run in this file (its fileKey, as figma_list_open_files reports it) instead of the active file. Fails if the Toko Relay plugin is not connected in that file; never falls back to the active file. Ignor… |
fontFamily | string | Optional font family to apply (e.g., 'Inter') |
fontSize | number | Optional font size to set |
fontStyle | string | Optional font style/weight to apply (e.g., 'Bold', 'Semi Bold'). No-space variants like 'SemiBold' are auto-corrected. |
figma_create_child
Create a new child node inside a parent container. Always place inside an existing Section or Frame — never on a bare page. If no suitable parent exists, create a Section first. Clean up any empty or orphaned nodes if the operation fails.
| Parameter | Type | Description |
|---|---|---|
nodeType * | string | Type of node to create |
parentId * | string | The parent node ID |
fileKey | string | Run in this file (its fileKey, as figma_list_open_files reports it) instead of the active file. Fails if the Toko Relay plugin is not connected in that file; never falls back to the active file. Ignor… |
properties | object | Properties for the new node |
figma_arrange_component_set
Organize a component set with Figma's native purple dashed visualization. Use after creating variants, adding states (hover/disabled/pressed), or when component sets need cleanup. Arranges variants in a labeled grid (columns = last property like State, rows = other properties like Type+Size) and wraps the set in a white container with title, row/column labels. The variants are rearranged in place on the existing set, so the component set keeps its node ID and placed instances stay linked. Re-running replaces the container a previous run built around this set, only when it holds nothing but th…
| Parameter | Type | Description |
|---|---|---|
componentSetId | string | Node ID of the component set to arrange. If not provided, will look for a selected component set. |
componentSetName | string | Name of the component set to find. Used if componentSetId not provided. |
fileKey | string | Run in this file (its fileKey, as figma_list_open_files reports it) instead of the active file. Fails if the Toko Relay plugin is not connected in that file; never falls back to the active file. Ignor… |
options | object | Layout options |
figma_create_component_set
Create a component set with variants in one call — replaces hand-written figma.combineAsVariants scripts. Two modes: 1. **Generate from a base component**: pass baseComponentId + properties (variant axes). The base is cloned for every combination of the axes ({ State: ['default','hover','disabled'], Size: ['sm','lg'] } → 6 variants), each named 'Prop=Value' comma-joined (e.g. 'State=hover, Size=sm'), then combined into a set. The base component itself becomes the FIRST variant (same node ID), so existing instances of the base survive as instances of that variant. 2. **Combine existing com…
| Parameter | Type | Description |
|---|---|---|
arrangeOptions | object | Grid layout options, used when autoArrange is true. |
autoArrange | boolean | If true, arrange the new set in a labeled grid (columns = last property, rows = other properties) inside a white container — same in-place layout as figma_arrange_component_set. |
baseComponentId | string | Node ID of an existing COMPONENT to use as the base. Cloned per property combination; becomes the set's first variant (keeps its node ID, so placed instances survive). Mutually exclusive with componen… |
componentIds | array | Node IDs of existing COMPONENT nodes to combine as variants. Mutually exclusive with baseComponentId. Components already inside a component set are rejected. |
fileKey | string | Run in this file (its fileKey, as figma_list_open_files reports it) instead of the active file. Fails if the Toko Relay plugin is not connected in that file; never falls back to the active file. Ignor… |
name | string | Name for the component set (e.g., 'Button'). Defaults to Figma's derived name. |
parentId | string | Node ID of the container (frame/section) to create the set in. Defaults to the current page. |
position | object | Position of the set within its parent. |
properties | object | Variant property axes — required with baseComponentId. Example: { State: ['default','hover','disabled'], Size: ['sm','lg'] } creates 6 variants. Max 100 combinations. Names and values must not conta… |
variantProperties | array | Only with componentIds: one property map per component, aligned by index — e.g. [{ State: 'default' }, { State: 'hover' }]. Each component is renamed to 'Prop=Value, ...' before combining. Without t… |
figma_lint_design
Run comprehensive accessibility (WCAG 2.2) and design quality checks on the current page or a specific node tree. WCAG conformance checks (10 rules): color contrast (AA), non-text contrast (1.4.11), color-only differentiation (1.4.1), focus indicators (2.4.7), touch targets (2.5.8), image alt text (1.1.1), heading hierarchy (1.3.1), reflow/responsive (1.4.10), reading order (1.3.2), and disabled context (4.1.2). Best-practice readability hints (opt-in via rules: ['best-practice'] or ['all']): text sizing, line height, letter spacing, paragraph spacing. Note: line/paragraph spacing below 1.5x/2…
| Parameter | Type | Description |
|---|---|---|
fileKey | string | Run in this file (its fileKey, as figma_list_open_files reports it) instead of the active file. Fails if the Toko Relay plugin is not connected in that file; never falls back to the active file. Ignor… |
maxDepth | number | Maximum tree depth to traverse (default: 10) |
maxFindings | number | Maximum findings before stopping (default: 100) |
nodeId | string | Node ID to lint (defaults to current page) |
rules | array | Rule filter. Default (omitted) = ['wcag','design-system','layout'] — real WCAG conformance plus quality checks, with best-practice hints excluded. Groups: ['wcag'] (10 conformance rules), ['best-pra… |
figma_audit_component_accessibility
Deep accessibility audit for a specific component or component set. Produces a scorecard covering: state coverage (default/hover/focus/disabled/error/active/loading), focus indicator quality and contrast, non-color differentiation (WCAG 1.4.1), target size consistency (WCAG 2.5.8), annotation completeness, and color-blind simulation (protanopia/deuteranopia/tritanopia). Returns per-category scores (0-100) and prioritized recommendations. Use after designing a component to validate accessibility before handoff. Requires the Toko Relay plugin.
| Parameter | Type | Description |
|---|---|---|
fileKey | string | Run in this file (its fileKey, as figma_list_open_files reports it) instead of the active file. Fails if the Toko Relay plugin is not connected in that file; never falls back to the active file. Ignor… |
nodeId | string | Node ID of a COMPONENT_SET, COMPONENT, or INSTANCE to audit. Falls back to current selection if omitted. |
targetSize | number | Minimum touch target size in px (default: 24 per WCAG 2.5.8). Use 44 for iOS or 48 for Android guidelines. |
figma_export_tokens
Export Figma variables to design token files in your codebase. Bidirectional with figma_import_tokens — together they replace Style Dictionary and Tokens Studio's export pipeline for the popular styling methods. FULLY-IMPLEMENTED OUTPUT FORMATS: • dtcg — W3C DTCG JSON. Canonical pivot format. Round-trip safe via `$extensions["figma-console-mcp"]`. • css-vars — CSS custom properties with mode-aware selectors (`:root`, `.dark`, `[data-theme=...]`). • tailwind-v4 — Tailwind v4 `@theme inline` block. Token-to-namespace mapping (color/*, spacing/*, radius/*, etc.) generates Tai…
| Parameter | Type | Description |
|---|---|---|
collectionIds | array | Specific Figma collection IDs to export. Required when scope is 'collection'. Use figma_get_variables to enumerate available collections. |
colorFormat | string | Color value format in the output. Default: 'hex'. Use 'oklch' for modern Tailwind v4 charts. |
configPath | string | Explicit path to a tokens.config.json file. When omitted, the tool walks up from cwd looking for one — typical case is zero-arg. |
dtcgDialect | string | DTCG dialect for dtcg/json-flat/json-nested outputs. legacy (default): hex-string colors, maximum compatibility (Style Dictionary v4, Tokens Studio). 2025: DTCG 2025.10 object colors/dimensions (Style… |
format | string | Specific output format to emit. When omitted, formats come from tokens.config.json's generated.formats list. Common starting choices: 'dtcg' for the canonical JSON, 'css-vars' for runtime CSS custom p… |
modes | Modes to include in the output. 'all' (default) exports every mode in every collection. Pass an array like ['Light', 'Dark'] to filter. | |
outputPath | string | Filesystem path to write the output file(s) to. Relative paths resolve against the project root (the directory containing tokens.config.json) or cwd if no config. When omitted, the output is returned… |
prefix | string | Prefix prepended to every output token name (e.g. 'ds-', 'al-'). Only affects formatters that emit named tokens — DTCG and JSON outputs use unmodified paths. |
remBase | number | Base font size in pixels for px→rem conversion. Default: 16. |
resolveAliases | boolean | If true, alias references are resolved to literal values in the output. Default is false for JSON formats (preserves alias semantics) and true for CSS/SCSS/Tailwind/etc. (which can't natively express… |
scope | string | Whether to export the entire file's variables ('file', default) or just specific collections via collectionIds. |
sizeUnit | string | Unit for dimension tokens. Default: 'rem' for web outputs, 'pt' for iOS, 'dp' for Android. |
splitByCollection | boolean | Emit one file per Figma collection. Default false. Useful when collections map to different runtime themes. |
splitByMode | boolean | Emit one file per mode (e.g. tokens-light.css, tokens-dark.css). Default false (single file with all modes). |
strategy | string | How to handle existing output files. 'merge' (default) diffs against current contents and writes only changed tokens, preserving code-only additions. 'replace' wipes and rewrites. 'dry-run' computes t… |
figma_import_tokens
Push design tokens from your codebase into Figma as variables. Bidirectional with figma_export_tokens. ACCEPTS: DTCG JSON (canonical, fully supported including round-trip metadata preservation). Tokens Studio JSON, CSS custom properties, Tailwind v4 @theme, SCSS, and Style Dictionary v3 are scaffolded but return a NotImplementedError — convert to DTCG first via figma_export_tokens or hand-author DTCG. Use `format: "auto"` to sniff the input. APPLY PHASE (full bidirectional sync): toCreate entries create missing collections (with the token file's full mode list) and missing variables in one…
| Parameter | Type | Description |
|---|---|---|
collectionMapping | object | Map input token set names to Figma collection names. Example: {'primitives': 'Primitive Tokens'}. When omitted, set names map 1:1 to collection names. |
configPath | string | Explicit path to tokens.config.json. When omitted, the tool autodiscovers and uses the config's source.dir to find files. Mutually exclusive with `payload` and `files`. |
dryRun | boolean | Shorthand for strategy: 'dry-run'. Computes the diff and returns a preview without applying any changes to Figma. |
files | array | Multi-file import (used for Tokens Studio's split-set format, or for projects with many DTCG source files). Mutually exclusive with `payload` and `configPath`. |
format | string | Format of the input payload. 'auto' (default) detects from payload shape or file extension. Pass an explicit format if auto-detection misfires. |
modeMapping | object | Map input mode names to Figma mode names. Useful when source uses 'light'/'dark' and Figma uses 'Light'/'Dark'. Defaults to 1:1 mapping with case preservation. |
onConflict | string | How to resolve true two-sided conflicts (both Figma and code changed the same token since last sync). 'ask' (default) surfaces the conflict and writes nothing. 'figma-wins' / 'code-wins' apply the cor… |
payload | string | Single-file content to import. Use this for one-shot imports without setting up tokens.config.json. Mutually exclusive with `files` and `configPath`. |
prefix | string | Prefix to strip from input token names on import. E.g. with prefix 'ds-', a token named '--ds-color-primary' becomes 'color/primary'. |
strategy | string | How to apply changes. 'merge' (default) diffs against current Figma state and applies only deltas, preserving Figma-only variables. 'replace' wipes the target collections and rewrites. 'dry-run' compu… |
figma_get_file_data
Get full file structure and document tree. WARNING: Can consume large amounts of tokens. NOT recommended for component descriptions (use figma_get_component instead). Best for understanding file structure or finding component nodeIds. Start with verbosity='summary' and depth=1 for initial exploration.
| Parameter | Type | Description |
|---|---|---|
depth | number | How many levels of children to include (default: 1, max: 3). Start with 1 to prevent context exhaustion. Use 0 for full tree only when absolutely necessary. |
enrich | boolean | Set to true when user asks for: file statistics, health metrics, design system audit, or quality analysis. Adds statistics, health scores, and audit summaries. Default: false |
fileUrl | string | Figma file URL (e.g., https://figma.com/design/abc123). Auto-detected from the WebSocket connection to the Toko Relay plugin. Only required if not connected. |
nodeIds | array | Specific node IDs to retrieve (optional) |
verbosity | string | Controls payload size: 'summary' (IDs/names/types only, ~90% smaller - RECOMMENDED), 'standard' (essential properties, ~50% smaller), 'full' (everything). Default: summary for token efficiency. |
figma_get_variables
Extract design tokens and variables from a Figma file with code export support (CSS, Tailwind, TypeScript, Sass). Use when user asks for: design system tokens, variables, color/spacing values, theme data, or code exports. Handles multi-mode variables (Light/Dark themes). NOT for component metadata (use figma_get_component). Returns a compact summary by default — pass format='full' for the complete dataset or format='filtered' with collection/namePattern/mode filters for specific variables. Supports verbosity control to prevent token exhaustion. Resolution order: the Toko Relay plugin (works…
| Parameter | Type | Description |
|---|---|---|
collection | string | Filter variables by collection name or ID. Case-insensitive substring match. Only applies when format='filtered'. Example: 'Primitives' or 'VariableCollectionId:123' |
enrich | boolean | Set to true when user asks for: CSS/Sass/Tailwind exports, code examples, design tokens, usage information, dependencies, or any export format. Adds resolved values, dependency graphs, and usage analy… |
export_formats | array | Which code formats to generate examples for. Use when user mentions specific formats like 'CSS', 'Tailwind', 'SCSS', 'TypeScript', etc. Automatically enables enrichment. |
fileUrl | string | Figma file URL (e.g., https://figma.com/design/abc123). Auto-detected from the WebSocket connection to the Toko Relay plugin. Only required if not connected. |
format | string | Response format: 'summary' (~2K tokens with overview and names only), 'filtered' (apply collection/name/mode filters), 'full' (complete dataset from cache or fetch). Default: summary (token-efficient)… |
includePublished | boolean | Include published variables from libraries |
include_dependencies | boolean | Include variable dependency graph (requires enrich=true) |
include_exports | boolean | Include export format examples (requires enrich=true) |
include_usage | boolean | Include usage in styles and components (requires enrich=true) |
mode | string | Filter variables by mode name or ID. Only returns variables that have values for this mode. Only applies when format='filtered'. Example: 'Light' or 'Dark' |
namePattern | string | Filter variables by name using regex pattern or substring. Case-insensitive. Only applies when format='filtered'. Example: 'color/brand' or '^typography' |
page | integer | Page number for paginated results (1-based). Use when the response is too large to handle in one call. Applies to format='filtered' and format='full'. Default: 1. IMPORTANT: a page number beyond the l… |
pageSize | integer | Number of variables per page. Hard limit 100 — higher values are rejected with a validation error, not clamped. Default: 50. Applies to format='filtered' and format='full'. For format='full', pagina… |
parseFromConsole | boolean | DEPRECATED — setting this to true now raises an explicit error. The Puppeteer-based console parser no longer exists. Open the Toko Relay plugin in Figma Desktop and call figma_get_variables() withou… |
refreshCache | boolean | Force refresh cache by fetching fresh data from Figma. Use when data may have changed since last fetch. Default: false (use cached data if available and fresh) |
resolveAliases | boolean | Automatically resolve variable aliases to their final values (hex colors, numbers, etc.). When true, each variable will include a 'resolvedValuesByMode' field with the actual values instead of just al… |
returnAsLinks | boolean | Return variables as resource_link references instead of full data. Drastically reduces payload size (100+ variables = ~20KB vs >1MB). Recommended for large variable sets — combine with format='filte… |
useConsoleFallback | boolean | DEPRECATED — has no effect. The console-snippet workflow was removed in the Phase 3 CDP cleanup; the Toko Relay plugin now handles all non-REST variable extraction automatically. Kept for parameter… |
verbosity | string | Controls payload size: 'inventory' (names/IDs only, ~95% smaller, use with filtered), 'summary' (names/values only, ~80% smaller), 'standard' (essential properties, ~45% smaller), 'full' (everything).… |
figma_get_component
Get a SINGLE component's metadata or reconstruction specification. Two export formats: (1) 'metadata' (default) - comprehensive documentation with properties, variants, and design tokens for style guides and references, (2) 'reconstruction' - node tree specification compatible with Figma Component Reconstructor plugin for programmatic component creation. IMPORTANT: For local/unpublished components with metadata format, ensure the Toko Relay plugin is running (Right-click in Figma → Plugins → Development → Toko Relay (formerly Figma Desktop Bridge)) to get complete description data. TIP:…
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | Component node ID (e.g., '123:456') |
enrich | boolean | Set to true when user asks for: design token coverage, hardcoded value analysis, or component quality metrics. Adds token coverage analysis and hardcoded value detection. Default: false. Only applicab… |
fileUrl | string | Figma file URL (e.g., https://figma.com/design/abc123). Auto-detected from the WebSocket connection to the Toko Relay plugin. Only required if not connected. |
format | string | Export format: 'metadata' (default) for comprehensive documentation, 'reconstruction' for node tree specification compatible with Figma Component Reconstructor plugin |
figma_get_styles
Get all styles (color, text, effects, grids) from a Figma file with optional code exports. Use when user asks for: text styles, color palette, design system styles, typography, or style documentation. Returns organized style definitions with resolved values. NOT for design tokens/variables (use figma_get_variables). Set enrich=true for CSS/Tailwind/Sass code examples. Supports verbosity control to manage payload size. TIP: For full design system extraction (tokens + components + styles combined), prefer figma_get_design_system_kit instead — it returns everything in one optimized call.
| Parameter | Type | Description |
|---|---|---|
enrich | boolean | Set to true when user asks for: CSS/Sass/Tailwind code, export formats, usage information, code examples, or design system exports. Adds resolved values, usage analysis, and export format examples. De… |
export_formats | array | Which code formats to generate examples for. Use when user mentions specific formats like 'CSS', 'Tailwind', 'SCSS', 'TypeScript', etc. Automatically enables enrichment. Default: all formats |
fileUrl | string | Figma file URL (e.g., https://figma.com/design/abc123). Auto-detected from the WebSocket connection to the Toko Relay plugin. Only required if not connected. |
include_exports | boolean | Include export format examples (requires enrich=true) |
include_usage | boolean | Include component usage information (requires enrich=true) |
verbosity | string | Controls payload size: 'summary' (names/types only, ~85% smaller), 'standard' (essential properties, ~40% smaller), 'full' (everything). Default: standard |
figma_get_component_image
Render a specific component or node as an image (PNG, JPG, SVG, PDF). Returns image URL valid for 30 days. Use when user asks for: component screenshot, visual preview, rendered output, or 'show me'. NOT for component metadata/properties (use figma_get_component). NOT for getting code/layout data (use figma_get_component_for_development). Best for: visual references, design review, documentation.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | Component node ID to render as image (e.g., '695:313') |
fileUrl | string | Figma file URL (e.g., https://figma.com/design/abc123). Auto-detected from the WebSocket connection to the Toko Relay plugin. Only required if not connected. |
format | string | Image format (default: png) |
scale | number | Image scale factor (0.01-4, default: 2 for high quality) |
figma_get_component_for_development
Get component data optimized for high-fidelity UI implementation. Returns a deep component tree (depth 4) with design tokens (boundVariables), interaction states (reactions), sizing constraints (min/max/layoutSizing), text behavior (autoResize, truncation), Figma slots (named freeform-content regions on a component, with the components each accepts and any min/max limit violations), and design annotations. Automatically includes 2x rendered image. Use when user asks to: 'build this component', 'implement this in React/Vue', 'generate code for', or needs both visual reference and technical spec…
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | Component node ID to get data for (e.g., '695:313') |
codebasePath | string | Path to target codebase components directory (e.g., '/Users/me/project/src/components'). When provided, scans for existing components and includes a registry in the response to prevent recreating comp… |
fileUrl | string | Figma file URL (e.g., https://figma.com/design/abc123). REQUIRED unless figma_navigate was already called. |
includeImage | boolean | Include rendered image for visual reference (default: true) |
figma_get_file_for_plugin
Get file data optimized for plugin development with filtered properties (IDs, structure, plugin data, component relationships). Excludes visual properties (fills, strokes, effects) to reduce payload. Use when user asks for: plugin development, file structure for manipulation, node IDs for plugin API. NOT for component descriptions (use figma_get_component). NOT for visual/styling data (use figma_get_component_for_development). Supports deeper tree traversal (max depth=5) than figma_get_file_data.
| Parameter | Type | Description |
|---|---|---|
depth | number | How many levels of children to include (default: 2, max: 5). Higher depths are safe here due to filtering. |
fileUrl | string | Figma file URL (e.g., https://figma.com/design/abc123). REQUIRED unless figma_navigate was already called. |
nodeIds | array | Specific node IDs to retrieve (optional) |
figma_capture_screenshot
Capture a screenshot of a node using the plugin's exportAsync API. IMPORTANT: This tool captures the CURRENT state from the plugin runtime (not cloud state like REST API), making it reliable for validating changes immediately after making them. Use this instead of figma_get_component_image when you need to verify that changes were applied correctly. Defaults are AI-optimized: PNG at 1x with automatic downscaling so the longest side stays within the 1568px AI vision processing ceiling. PNG is the default because design tool content (flat colors, text, UI components) compresses significantly bet…
| Parameter | Type | Description |
|---|---|---|
format | string | Image format (default: PNG). Use JPG for photographic or gradient-heavy content. |
nodeId | string | ID of the node to capture (e.g., '1:234'). If not provided, captures the current page. |
scale | number | Scale factor (default: 1). The plugin automatically caps the effective scale so the exported image does not exceed 1568px on its longest side (the AI vision processing ceiling). |
figma_set_instance_properties
Update component properties on a component instance. IMPORTANT: Use this tool instead of trying to edit text nodes directly when working with component instances. Components often expose TEXT, BOOLEAN, INSTANCE_SWAP, and VARIANT properties that control their content. SLOT properties CANNOT be set here — use figma_append_to_slot to populate slot content. Direct text node editing may fail silently if the component uses properties. This tool handles the #nodeId suffix pattern automatically. Requires a connection to the Toko Relay plugin.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | ID of the INSTANCE node to update (e.g., '1:234'). Must be a component instance, not a regular frame. |
properties * | object | Properties to set. Keys are property names (e.g., 'Label', 'Show Icon', 'Size'). Values are strings for TEXT/VARIANT properties, booleans for BOOLEAN properties. The tool automatically handles the #no… |
figma_check_design_parity
Compare a Figma component's design specs against code-side data to find discrepancies. Returns a parity score, categorized discrepancies, and actionable fix items for both design-side (Figma tool calls) and code-side (file edits). Read the component source code first, then pass the data in codeSpec.
| Parameter | Type | Description |
|---|---|---|
codeSpec * | object | Structured code-side component data. Read the component source code first, then fill in the relevant sections. |
nodeId * | string | Component node ID (e.g., '695:313') |
canonicalSource | string | Which source is the canonical truth. Fixes will target the other side. Default: 'design' |
enrich | boolean | Enable token coverage and enrichment analysis. Default: true |
fileUrl | string | Figma file URL. Uses current URL if omitted. |
figma_generate_component_doc
Generate AI-complete component documentation from a Figma component. Produces structured markdown with anatomy, per-variant color tokens, typography, content guidelines (parsed from Figma description), design annotations (animation timings, interaction specs, accessibility notes from Dev Mode), icon mapping, spacing tokens, and design-code parity analysis. Merges Figma design data with optional code-side info (CVA definitions, sub-component APIs, source files). Output works with any docs platform. For richest output, read the component source code first and pass codeInfo.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | Component node ID (e.g., '695:313') |
codeInfo | object | Code-side documentation info. Read the component source code first, then fill in relevant sections. Include variantDefinition for CVA/variant code, subComponents for composable sub-parts, sourceFiles… |
enrich | boolean | Enable enrichment for token data |
fileUrl | string | Figma file URL. Uses current URL if omitted. |
includeFrontmatter | boolean | Include YAML frontmatter metadata |
outputPath | string | Suggested output file path |
sections | object | Toggle which sections to include |
systemName | string | Design system name for headers |
figma_get_comments
Get comments on a Figma file. Returns comment threads with author, message, timestamps, and pinned node locations. Use include_resolved to also see resolved comments.
| Parameter | Type | Description |
|---|---|---|
as_md | boolean | Return comment message bodies as markdown. Default: false |
fileUrl | string | Figma file URL. Uses current URL if omitted. |
include_resolved | boolean | Include resolved (completed) comment threads. Default: false (only active comments) |
figma_post_comment
Post a comment on a Figma file, optionally pinned to a specific design node. Use after figma_check_design_parity to notify designers of drift when code is the canonical source. Supports replies to existing comment threads. Limitation: @mentions are a Figma UI-only feature — including '@name' in the message renders as plain text, not a clickable mention tag, and does not trigger Figma notifications.
| Parameter | Type | Description |
|---|---|---|
message * | string | The comment message text. Supports basic formatting. |
fileUrl | string | Figma file URL. Uses current URL if omitted. |
node_id | string | Node ID to pin the comment to (e.g., '695:313'). Comment appears on that element in Figma. |
reply_to_comment_id | string | ID of an existing comment to reply to. Creates a threaded reply instead of a new top-level comment. |
x | number | X coordinate for comment placement (absolute canvas position). Used with node_id. |
y | number | Y coordinate for comment placement (absolute canvas position). Used with node_id. |
figma_delete_comment
Delete a comment from a Figma file by its comment ID. Use figma_get_comments to find comment IDs first.
| Parameter | Type | Description |
|---|---|---|
comment_id * | string | The ID of the comment to delete. Get IDs from figma_get_comments. |
fileUrl | string | Figma file URL. Uses current URL if omitted. |
figma_get_file_versions
List a Figma file's version history with metadata (label, description, author, timestamp). Auto-paginates up to max_versions. By default returns only labeled versions (skips auto-saves). Pass include_autosaves=true to see every saved state. Use the returned pagination.next_cursor to continue paging. Required scope: file_versions:read (OAuth) or 'Versions' Read (PAT).
| Parameter | Type | Description |
|---|---|---|
cursor | string | Version ID returned as pagination.next_cursor on a previous call. Pass to continue from where the last call stopped. |
fileUrl | string | Figma file URL. Uses current URL if omitted. |
include_autosaves | boolean | Include auto-saved versions (those without a label). Default: false. |
max_versions | integer | Hard cap on returned versions. Default 50, max 200. |
figma_get_file_at_version
Fetch a Figma file (or specific nodes) as it existed at a past version_id. Thin snapshot tool — same shape as figma_get_file_data but bound to a historical version. Use figma_get_file_versions to discover version IDs. Combine with depth and node_ids to keep payloads small. Required scope: file_content:read (already standard).
| Parameter | Type | Description |
|---|---|---|
version_id * | string | The version ID to snapshot (from figma_get_file_versions). |
depth | integer | How deep into the document tree to recurse. Lower is cheaper. Default: full depth (no limit). |
fileUrl | string | Figma file URL. Uses current URL if omitted. |
node_ids | array | Optional: snapshot only these node IDs instead of the full file. Reduces payload significantly for targeted inspection. |
figma_diff_versions
Diff two versions of a Figma file. Always returns a cheap page-structure diff (added/removed/renamed pages, 2 API calls). Pass component_ids to additionally get per-node deep diffs at depth=2 (added/removed children, name/description changes, componentPropertyDefinitions changes for COMPONENT_SETs, boundVariables deltas) — costs 2 API calls per scoped node. Use 'current' for to_version to diff against HEAD. v1.25.0: when the Toko Relay plugin is connected, description and Dev Mode annotation changes are ALSO tracked via a session buffer and surfaced under `scoped_nodes[].metadata_changes[]`…
| Parameter | Type | Description |
|---|---|---|
from_version * | string | The earlier version_id to compare from. Get from figma_get_file_versions. |
to_version * | string | The later version_id to compare to. Use 'current' for HEAD. |
component_ids | array | Optional. Node IDs (typically COMPONENT_SETs) to diff in detail. If omitted, falls back to the current Figma selection. If neither is available, only the page-structure diff is returned. Use figma_get… |
fileUrl | string | Figma file URL. Uses current URL if omitted. |
mode | string | Output verbosity. summary=counts only, standard=names+counts (default), detailed=full property/binding details. |
figma_get_changes_since_version
Convenience wrapper for figma_diff_versions: compares a given version against the current HEAD. Same output shape as figma_diff_versions, with to_version implicitly 'current'. Useful for 'what's changed since the last code-sync' workflows.
| Parameter | Type | Description |
|---|---|---|
since_version * | string | The version_id to compare against the current HEAD. |
component_ids | array | Optional. Node IDs to diff in detail. If omitted, falls back to the current Figma selection. Same semantics as figma_diff_versions otherwise. |
fileUrl | string | Figma file URL. Uses current URL if omitted. |
mode | string |
figma_generate_changelog
Generate a human-readable markdown changelog between two versions. Wraps figma_diff_versions and enriches the output with author labels and timestamps via figma_get_file_versions lookback (one extra cheap API call). Returns BOTH a `markdown` string (paste into release notes / PRs / Storybook MDX) and the structured diff data. Same component_ids and mode semantics as figma_diff_versions. Use 'current' for to_version to changelog against HEAD.
| Parameter | Type | Description |
|---|---|---|
from_version * | string | The earlier version_id. Get from figma_get_file_versions. |
to_version * | string | The later version_id. Use 'current' for HEAD. |
component_ids | array | Optional. Node IDs to include in the per-component changelog section. If omitted, falls back to the current Figma selection. |
fileUrl | string | Figma file URL. Uses current URL if omitted. |
mode | string | Output verbosity. summary=one-liner, standard=sectioned with counts (default), detailed=full per-property/per-binding bullets. |
figma_blame_node
Find the version that introduced a specific change to a node — answers 'who/when added this'. Walks version history backward via binary search (~log2(N) API calls instead of N) to localize the introduction point. Returns the version's metadata (label/author/timestamp). Default includes autosaves for finer attribution; system 'Figma' user appears occasionally for scheduled snapshots and is flagged via attribution_certainty='system_attributed'. Specify EXACTLY ONE of target_component_property or target_child_node_id. node_id is optional — if omitted, falls back to the first node in the curre…
| Parameter | Type | Description |
|---|---|---|
fileUrl | string | Figma file URL. Uses current URL if omitted. |
include_autosaves | boolean | Include auto-saved versions in the search range. Default true (better attribution accuracy; most autosaves carry the real human user). |
max_versions_to_walk | integer | Lookback cap. Binary search probes ~log2(N) of these. Default 200, max 500. |
node_id | string | The parent node ID to inspect (typically a COMPONENT_SET). If omitted, falls back to the first node in the current Figma selection. |
start_version | string | Version to walk backward from. Default 'current' (HEAD). |
target_child_node_id | string | A descendant node ID — find when this child was first added under node_id. |
target_component_property | string | A componentPropertyDefinitions key (e.g. 'Disabled#1:2') — find when this property was first added to the node. |
figma_get_design_system_kit
PREFERRED TOOL for design system extraction — replaces separate figma_get_styles, figma_get_variables, and figma_get_component calls. Returns tokens, components, and styles in a single optimized response with adaptive compression for large systems. Includes component visual specs (exact colors, padding, typography, layout), rendered screenshots, token values per mode (light/dark), and resolved style values. Use this instead of calling individual tools to avoid context window overflow. Ideal for AI code generation — use visualSpec for pixel-accurate reproduction. Variant specs are delta-enc…
| Parameter | Type | Description |
|---|---|---|
componentIds | array | Optional list of specific component node IDs to include. If omitted, all published components are returned. |
fileKey | string | Figma file key. If omitted, extracted from the current browser URL. |
format | string | 'full' returns complete data with visual specs and resolved values. 'summary' strips variant-level visual specs (medium payload). 'compact' returns only names, types, and property definitions (smalles… |
include | array | Which sections to include. Defaults to all. |
includeImages | boolean | Include image URLs for components (adds latency). Default false. |
figma_get_library_component_by_key
Get full property definitions, variants, and visual specs for a SINGLE published library component using only its component key. **USE THIS when you have a component key** (the 40-char hex returned by figma_search_components, figma_get_library_components, or search_design_system) **and want to inspect what properties/variants it exposes** before instantiating it — without first needing the source library file's URL. **RESOLVES**: componentKey → file_key + node_id → componentPropertyDefinitions + variants + visualSpec. **WORKFLOW**: 1. Pass the componentKey from search results 2. Tool…
| Parameter | Type | Description |
|---|---|---|
componentKey * | string | The component key (40-char hex string from search results, e.g., '806826503bbd2ab15d0ff77d076a9406a5a83197'). Works for both COMPONENT_SET and standalone COMPONENT keys. |
format | string | 'full' returns properties + variants + visual specs. 'summary' returns properties + variant names only (no visualSpec). Auto-downgrades to 'summary' on large responses. |
includeVisualSpecs | boolean | Include per-variant visual specs (fills, strokes, padding, typography). Default true. Auto-stripped if response exceeds 500KB. |
figma_get_library_variables
List all variables from team libraries the current file has subscribed. **USE THIS** when you want to see what design tokens (colors, spacing, typography sizes, booleans, strings) are available from shared libraries — without needing the library file's URL or REST API Enterprise plan. **HOW IT WORKS**: Calls figma.teamLibrary.getAvailableLibraryVariableCollectionsAsync() + getVariablesInLibraryCollectionAsync() via the Toko Relay plugin. Only libraries the user has explicitly enabled in the current file appear (Figma security model). **WORKFLOW**: 1. Call this tool to inventory available…
| Parameter | Type | Description |
|---|---|---|
collectionName | string | Optional: filter by collection name within a library (case-insensitive substring match). E.g., 'Colors' or 'Spacing'. |
libraryName | string | Optional: filter by library name (case-insensitive substring match). E.g., 'Northright' or 'Altitude'. |
resolvedType | string | Optional: filter by variable type. Useful when you only need color tokens or only spacing values. |
figma_import_library_variable
Import a single variable from a subscribed team library into the current file. After import, the variable becomes locally addressable by its returned 'id' and can be passed to any tool that binds variables to nodes (fills, strokes, paddings, etc.). The import is idempotent — calling it twice returns the same local id. **WORKFLOW**: 1. Run figma_get_library_variables to find the variable key 2. Call this tool with that key 3. Use the returned 'id' with figma_set_fills (boundVariables), figma_update_variable, or other binding tools **REQUIRES** the Toko Relay plugin and that the source libr…
| Parameter | Type | Description |
|---|---|---|
variableKey * | string | The variable key from figma_get_library_variables (collections[].variables[].key). Distinct from the variable's local id. |
figma_scan_code_accessibility
Scan HTML code for accessibility violations using axe-core (Deque). Runs structural/semantic checks via JSDOM: ARIA attributes, roles, labels, alt text, form labels, heading order, landmarks, semantic HTML, tabindex, duplicate IDs, lang attribute, and ~50 more rules. Visual checks (color contrast, focus visibility) are disabled in this mode — use figma_lint_design for visual a11y on the design side. Also surfaces a WCAG 1.4.12 (Text Spacing) / 1.4.4 (Resize Text) advisory when typography is locked to fixed px units — the code side is where text-spacing override support is actually verified…
| Parameter | Type | Description |
|---|---|---|
html * | string | HTML string to scan. Can be a full document or a component fragment (will be wrapped in a valid document). |
context | string | CSS selector to scope the scan to a specific element (e.g., '#my-component', '.card'). Scans entire document if omitted. |
includePassingRules | boolean | If true, includes count of passing and incomplete rules in the response (default: false). |
mapToCodeSpec | boolean | If true, includes a codeSpec.accessibility object auto-extracted from the HTML + scan results. Pass this directly into figma_check_design_parity's codeSpec.accessibility field for automated design-to-… |
tags | array | WCAG tag filter. Examples: ['wcag2a'], ['wcag2aa'], ['wcag21aa'], ['wcag22aa'], ['best-practice']. Defaults to all structural rules if omitted. |
figma_diagnose
Designer-readable health check for figma-console-mcp. Use this when something seems wrong — it self-identifies the server, reports plugin connection / file / token status in plain language, and disambiguates errors that may be coming from a different Figma-related MCP server. Recommended as the first step when a user reports a "token expired" or "plugin disconnected" issue.
| Parameter | Type | Description |
|---|---|---|
verbose | boolean | Include the raw structured state alongside the human-readable report. |
figma_get_annotations
Read annotations from a Figma node. Annotations are designer-authored specs attached to nodes — they can include notes (plain text or markdown), pinned design properties (fills, width, fontSize, etc.), and category labels. Use this to discover animation timings, interaction specs, accessibility requirements, and other implementation details that designers annotate directly on the design. Set include_children=true to get annotations from child nodes too (useful for full component documentation). Requires the Toko Relay plugin.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | Node ID to read annotations from (e.g., '695:313') |
depth | number | How many levels deep to traverse when include_children is true (default: 1, max recommended: 5) |
include_children | boolean | Also read annotations from child nodes. Useful for getting all annotations within a component tree. |
figma_set_annotations
Write or clear annotations on a Figma node. Annotations communicate design specs to developers — use them to document animation timings, easing curves, interaction behaviors, accessibility requirements, and implementation notes. Supports plain text labels, rich markdown labels, pinned design properties, and annotation categories. Pass an empty array to clear all annotations. Use mode='append' to add to existing annotations, or mode='replace' (default) to overwrite. Requires the Toko Relay plugin. This operation is undoable in Figma (Cmd+Z).
| Parameter | Type | Description |
|---|---|---|
annotations * | array | Array of annotations to set. Each annotation can have a label (plain or markdown), pinned properties, and a category. Pass an empty array [] to clear all annotations. |
nodeId * | string | Node ID to write annotations to (e.g., '695:313') |
mode | string | 'replace' (default) overwrites all existing annotations. 'append' adds new annotations while keeping existing ones. |
figma_get_annotation_categories
List available annotation categories in the current Figma file. Categories group annotations by purpose (e.g., interactions, accessibility, development notes). Use the returned category IDs when creating annotations with figma_set_annotations. Requires the Toko Relay plugin.
figma_get_component_for_development_deep
Get a deeply nested component tree with full visual properties, resolved design token names, instance references, prototype interactions, and annotations at every level. Uses the Figma Plugin API through the Toko Relay plugin for unlimited depth traversal — essential for complex components like data tables, nested menus, date pickers, and compound form fields where the standard depth-4 REST API tool misses deeper structure. Returns boundVariables resolved to actual token names (not just IDs), mainComponent references for INSTANCE nodes, and reactions for interaction states. Requires the Toko…
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | Component node ID to extract (e.g., '695:313') |
depth | number | Maximum tree depth to traverse (default: 10, max: 20). Use higher values for deeply nested components. |
figma_analyze_component_set
Analyze a Figma COMPONENT_SET to extract variant state machine and cross-variant diffs for code generation. Returns: (1) variant axes (size, state) with all values, (2) CSS pseudo-class mappings for interaction states (hover→:hover, focus→:focus-visible, disabled→:disabled, error→[aria-invalid]), (3) visual diff from default state per variant (only changed properties — fill token, stroke token, stroke weight, text color, opacity, effects, visibility), (4) component property definitions mapped to code props (BOOLEAN→boolean, TEXT→string, INSTANCE_SWAP→slot/ReactNode), and (5) sl…
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | COMPONENT_SET node ID (the parent of all variants, e.g., '214:274') |
figjam_create_sticky
Create a sticky note on a FigJam board. Only works in FigJam files. **Colors:** YELLOW, BLUE, GREEN, PINK, ORANGE, PURPLE, RED, LIGHT_GRAY, GRAY (default: YELLOW)
| Parameter | Type | Description |
|---|---|---|
text * | string | Text content for the sticky note |
color | string | Sticky color |
x | number | X position on canvas |
y | number | Y position on canvas |
figjam_create_stickies
Batch create multiple sticky notes on a FigJam board (max 200). Use this to populate boards from structured data (meeting notes, brainstorm ideas, etc.). **Colors:** YELLOW, BLUE, GREEN, PINK, ORANGE, PURPLE, RED, LIGHT_GRAY, GRAY
| Parameter | Type | Description |
|---|---|---|
stickies * | array | Array of sticky note specifications (max 200) |
figjam_create_connector
Connect two nodes with a connector line in FigJam. Use to create flowcharts, diagrams, and relationship maps. Nodes must exist on the board (stickies, shapes, etc.). Use their node IDs from creation results. **Magnet positions:** AUTO (default), TOP, BOTTOM, LEFT, RIGHT — controls where the connector attaches to each node.
| Parameter | Type | Description |
|---|---|---|
endNodeId * | string | Node ID of the end element |
startNodeId * | string | Node ID of the start element |
endMagnet | string | Magnet position on the end node |
label | string | Optional text label on the connector |
startMagnet | string | Magnet position on the start node |
figjam_create_shape_with_text
Create a labeled shape on a FigJam board with optional size, colors, and font control. Use for flowchart nodes, process diagrams, and visual organization. **Shape types:** ROUNDED_RECTANGLE (default), DIAMOND, ELLIPSE, TRIANGLE_UP, TRIANGLE_DOWN, PARALLELOGRAM_RIGHT, PARALLELOGRAM_LEFT, ENG_DATABASE, ENG_QUEUE, ENG_FILE, ENG_FOLDER
| Parameter | Type | Description |
|---|---|---|
fillColor | string | Fill color as hex (e.g., '#E1F5EE') |
fontSize | number | Text font size in pixels |
height | number | Height in pixels |
shapeType | string | Shape type |
strokeColor | string | Stroke/border color as hex |
strokeDashPattern | string | Dash pattern as comma-separated numbers (e.g., '10,5' for dashed) |
text | string | Text label for the shape |
width | number | Width in pixels |
x | number | X position on canvas |
y | number | Y position on canvas |
figjam_create_section
Create a section on a FigJam board. Sections are containers that can hold other elements. Use for grouping related content. **Note:** After creating a section, place elements inside it by setting their x/y coordinates within the section's bounds, then use figma_execute to call section.appendChild(node) to parent them.
| Parameter | Type | Description |
|---|---|---|
fillColor | string | Fill color as hex |
height | number | Section height in pixels |
name | string | Section name/title |
width | number | Section width in pixels |
x | number | X position on canvas |
y | number | Y position on canvas |
figjam_create_table
Create a table on a FigJam board with optional cell data. Use for structured data display, comparison matrices, and organized information. **Data format:** 2D array of strings, e.g. [["Header1", "Header2"], ["Row1Col1", "Row1Col2"]]
| Parameter | Type | Description |
|---|---|---|
columns * | number | Number of columns (1-50) |
rows * | number | Number of rows (1-100) |
data | array | 2D array of cell text content (row-major order) |
x | number | X position on canvas |
y | number | Y position on canvas |
figjam_create_code_block
Create a code block on a FigJam board. Use for sharing code snippets, config examples, or technical documentation in collaborative boards.
| Parameter | Type | Description |
|---|---|---|
code * | string | The code content |
language | string | Programming language (e.g., 'JAVASCRIPT', 'PYTHON', 'TYPESCRIPT', 'JSON', 'HTML', 'CSS') |
x | number | X position on canvas |
y | number | Y position on canvas |
figjam_auto_arrange
Arrange nodes on a FigJam board in a grid, horizontal row, or vertical column layout. Use after batch-creating elements to organize them neatly.
| Parameter | Type | Description |
|---|---|---|
nodeIds * | array | Array of node IDs to arrange (max 500) |
columns | number | Number of columns for grid layout (defaults to sqrt of node count) |
layout | string | Layout type: grid, horizontal, or vertical |
spacing | number | Spacing between nodes in pixels |
figjam_get_board_contents
Read all content from a FigJam board. Returns stickies, shapes, connectors, tables, code blocks, and sections with their text content and positions. Use this to understand what's on a board before modifying it, or to extract structured data from collaborative sessions. **Filters:** Pass nodeTypes to limit results (e.g., ["STICKY"] for only stickies). Omit for everything.
| Parameter | Type | Description |
|---|---|---|
maxNodes | number | Maximum nodes to return (1-1000, default: 500) |
nodeTypes | array | Filter by node types. Omit for all. |
figjam_get_connections
Read the connection graph from a FigJam board. Returns all connectors with their start/end node references and labels. Use this to understand relationships, flowcharts, and diagrams. Returns edges as {startNodeId, endNodeId, label} plus a summary of connected nodes.
figma_list_slides
List all slides in the current Figma Slides presentation with their IDs, names, grid positions, and skip status. Only works in Slides files.
figma_get_slide_content
Get the content tree of a specific slide including all text, shapes, and frames. Returns node hierarchy with properties.
| Parameter | Type | Description |
|---|---|---|
slideId * | string | The node ID of the slide, e.g. '1:23' |
figma_get_slide_grid
Get the 2D slide grid layout showing how slides are organized in rows and columns.
figma_get_slide_transition
Get the current transition settings for a slide (style, duration, easing curve, timing).
| Parameter | Type | Description |
|---|---|---|
slideId * | string | The node ID of the slide |
figma_get_text_styles
Get all local text styles in the current file. Returns style IDs, names, font info, and sizes. Use these IDs when setting textStyleId on text nodes via figma_execute.
figma_get_focused_slide
Get the slide currently focused in single-slide view.
figma_create_slide
Create a new blank slide in the Figma Slides presentation. Optionally specify grid position.
| Parameter | Type | Description |
|---|---|---|
col | integer | Column index in the slide grid (0-based) |
row | integer | Row index in the slide grid (0-based) |
figma_delete_slide
Delete a slide from the presentation. WARNING: This is a destructive operation (can be undone with Figma's undo).
| Parameter | Type | Description |
|---|---|---|
slideId * | string | The node ID of the slide to delete |
figma_duplicate_slide
Duplicate an existing slide. The clone is placed adjacent to the original.
| Parameter | Type | Description |
|---|---|---|
slideId * | string | The node ID of the slide to duplicate |
figma_reorder_slides
Reorder slides by providing a new 2D array of slide IDs. Each inner array represents a row in the grid. WARNING: This is a destructive operation.
| Parameter | Type | Description |
|---|---|---|
grid * | array | 2D array of slide IDs representing the new order, e.g. [['1:2','1:3'],['1:4']] |
figma_set_slide_transition
Set the transition effect for a slide (style, duration, easing curve). Triggers on click by default.
| Parameter | Type | Description |
|---|---|---|
slideId * | string | The node ID of the slide |
style * | string | Transition style |
curve | string | Easing curve |
duration | number | Duration in seconds (0.01 to 10) |
figma_skip_slide
Toggle whether a slide is skipped during presentation mode.
| Parameter | Type | Description |
|---|---|---|
skip * | boolean | True to skip the slide, false to include it |
slideId * | string | The node ID of the slide |
figma_add_text_to_slide
Add a new text element to a specific slide. Supports custom fonts, colors, alignment, and text formatting.
| Parameter | Type | Description |
|---|---|---|
slideId * | string | The node ID of the slide |
text * | string | The text content |
color | string | Text fill color as hex (e.g., '#FFFFFF') |
fontFamily | string | Font family (e.g., 'Manrope', 'IBM Plex Sans') |
fontSize | number | Font size in pixels |
fontStyle | string | Font style/weight (e.g., 'Bold', 'SemiBold', 'Medium') |
letterSpacing | number | Letter spacing in pixels |
lineHeight | number | Line height in pixels |
textAlign | string | Horizontal text alignment |
textCase | string | Text case transformation |
width | number | Text box width for wrapping. When set, enables text wrapping. |
x | number | X position |
y | number | Y position |
figma_add_shape_to_slide
Add a rectangle or ellipse shape to a specific slide with optional fill color.
| Parameter | Type | Description |
|---|---|---|
height * | number | Height in pixels |
shapeType * | string | Shape type |
slideId * | string | The node ID of the slide |
width * | number | Width in pixels |
x * | number | X position |
y * | number | Y position |
fillColor | string | Hex color e.g. '#FF5733' |
figma_set_slide_background
Set the background color of a slide. Creates or updates a full-slide background rectangle.
| Parameter | Type | Description |
|---|---|---|
color * | string | Background color as hex (e.g., '#181818') |
slideId * | string | The node ID of the slide |
figma_set_slides_view_mode
Toggle the Figma Slides viewport between grid view and single-slide view.
| Parameter | Type | Description |
|---|---|---|
mode * | string | View mode |
figma_focus_slide
Navigate to and focus a specific slide in single-slide view.
| Parameter | Type | Description |
|---|---|---|
slideId * | string | The node ID of the slide to focus |
figma_create_slot
Create a SlotNode inside a component using createSlot(). Automatically creates a linked SLOT component property named after the slot (renaming the slot renames the property). Slots are freeform drop zones for instance content — more flexible than INSTANCE_SWAP. Works on standalone COMPONENTs and variant COMPONENTs inside a COMPONENT_SET (call once per variant). GRID layout is not allowed on slots. Requires the Toko Relay plugin.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | The COMPONENT node ID to add a slot to |
height | number | Initial slot height in pixels |
layoutMode | string | Auto-layout mode for the slot (GRID is not supported) |
name | string | Slot layer name (e.g. 'Content', 'Footer') |
width | number | Initial slot width in pixels |
figma_get_slots
List SlotNode children on a component, component set, or instance. Returns slot IDs, names, property keys, dimensions, and current child nodes. Use on instances before figma_append_to_slot to discover slot names/IDs.
| Parameter | Type | Description |
|---|---|---|
nodeId * | string | COMPONENT, COMPONENT_SET, or INSTANCE node ID |
figma_append_to_slot
Add content to a slot on a component instance. Clones sourceNodeId into the slot, or creates a new node (nodeType). SLOT content cannot be set via figma_set_instance_properties — use this tool instead. Widgets, stickies, and raw ComponentNodes cannot be appended to slots.
| Parameter | Type | Description |
|---|---|---|
clearExisting | boolean | Remove existing slot children before appending |
clone | boolean | When using sourceNodeId, clone the node (default true). Set false to move. |
instanceId | string | Instance ID — use with slotName when slotId is unknown |
nodeType | string | Create a new node in the slot instead of cloning |
properties | object | Properties for created nodes: name, text, width, height |
slotId | string | Direct SlotNode ID (from figma_get_slots) |
slotName | string | Slot layer name on the instance (e.g. 'Content') |
sourceNodeId | string | Node to clone into the slot (default: clone=true) |
figma_reset_slot
Reset a slot on a component instance to its default (empty) state from the main component. Uses SlotNode.resetSlot().
| Parameter | Type | Description |
|---|---|---|
instanceId | string | Instance ID — use with slotName when slotId is unknown |
slotId | string | Direct SlotNode ID |
slotName | string | Slot layer name on the instance |
figma_add_slot_property
Manually add a SLOT component property and bind it to an existing frame (alternative to figma_create_slot). The frame must be a direct child of the component, must not use GRID layout, and must not be nested inside another slot. Supports description and preferredValues.
| Parameter | Type | Description |
|---|---|---|
frameNodeId * | string | Frame node ID to bind as the slot content area |
nodeId * | string | COMPONENT or COMPONENT_SET node ID |
propertyName * | string | Slot property name (e.g. 'Content') |
description | string | Slot property description (SLOT-only) |
preferredValues | array | Preferred components for slot content (SLOT-only) |