Skip to main content
Glama
neozhehan

Figma Edit MCP

by neozhehan

get_nodes_info

Retrieve detailed properties of Figma nodes with recursive subtree traversal, property filtering, and depth control. Ideal for extracting node data like fills, strokes, or layout settings.

Instructions

Get detailed information about one or more nodes. Supports recursive subtree traversal, property filtering, and streaming progress.

  • If no nodeIds are provided, the tool defaults to the current 'editable scope' (the node(s) selected when the plugin was opened).

  • Properties: When 'fields' is empty, only 'id', 'name', and 'type' are returned for each node. To get more data, specify fields from Figma's REST API (e.g., 'fills', 'strokes', 'characters', 'layoutMode').

  • Safe-list: Common properties like 'id', 'name', 'type', 'visible', 'locked', 'children', and 'descendantCount' are always available and do not incur additional performance cost.

  • Filtering: Use the 'filter' object to prune the tree (e.g., {"type": ["TEXT", "COMPONENT"]}). A node is included if it matches the filter OR has matching descendants.

  • Depth: 'maxDepth' controls how deep the recursive walk goes. Use 0 for just the target nodes, or higher for subtrees. Boundary nodes at maxDepth will include a 'descendantCount'.

  • Performance: This tool streams progress updates and is safe for deep traversals.

RESPONSE SHAPE:

  • Returns { nodes: [...], missingNodeIds?: [...] }. Each node has recursive 'children' arrays. When 'fields' is non-empty, every node (top-level and descendants) carries a 'properties' sub-object with only applicable keys — inapplicable keys are omitted (never null). Top-level entries always include 'descendantCount' (total recursive descendants). Boundary nodes at 'maxDepth' also include 'descendantCount' so you can distinguish truncated nodes from genuine leaves.

PATH:

  • Each top-level node includes a 'path' array of 3-tuples [type, id, name] representing the ancestor chain from the containing page down to the immediate parent. Pages have path === []. Direct children of a page have one element.

FILTER BEHAVIOR:

  • Filters are applied recursively across the entire subtree. Non-matching ancestors of matching nodes are retained as structural containers. Filter evaluation only runs within the maxDepth window — matches deeper than the depth cap are invisible.

COST & LATENCY:

  • Cost scales with SUBTREE SIZE, not nodeId count. A single PAGE-level id can be as expensive as thousands of leaf ids. Use 'maxDepth' to bound the walk.

  • Non-safe-list 'fields' trigger per-node exportAsync (moderate cost on retained nodes only). Non-safe-list 'filter' keys trigger exportAsync on EVERY candidate descendant before pruning (higher cost). Prefer safe-list filter keys with tight nodeIds or maxDepth.

MISSING NODES:

  • ALWAYS check 'missingNodeIds' in the response. Any nodeId not present in 'nodes' is listed there. Treat absence from 'nodes' as authoritative and surface to the user.

RECOMMENDED PAIRINGS:

  • For cheap structural scans: safe-list filter + no fields.

  • For targeted property reads: tight nodeIds or maxDepth + specific fields.

  • For filtered property reads: safe-list filter + fields on retained nodes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodeIdsNoArray of node IDs to get information about. If empty, uses editable scope.
fieldsNoArray of field names to return. Supported fields include 'fills', 'strokes', 'cornerRadius', 'opacity', 'blendMode', 'effects', 'characters', 'style', 'layoutMode', 'itemSpacing', 'paddingLeft', 'paddingRight', 'paddingTop', 'paddingBottom', 'primaryAxisAlignItems', 'counterAxisAlignItems', 'absoluteBoundingBox', 'visible', 'locked', 'componentPropertyDefinitions', 'componentProperties', 'overrides', 'transitionNodeID', 'transitionDuration', 'transitionEasing'.
filterNoOptional filter criteria. Format: { fieldName: [value1, value2] }. Example: { type: ['TEXT', 'COMPONENT'], layoutMode: ['HORIZONTAL'] }. Matches are case-sensitive and multiple values for a field are treated as OR. Multiple fields are treated as AND.
maxDepthNoMaximum depth for recursive child traversal. 0 = self only, 1 = self and immediate children, etc. If omitted, performs a full depth traversal (use with caution on large subtrees).
Behavior5/5

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

No annotations present, so description carries full burden. Extensively covers default scope, property filtering, safe-list concept, performance cost scaling, missing node handling, response shape, and filter evaluation behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Description is long but well-structured with bullet points and sections. Every sentence provides useful information, though some details could be slightly trimmed. Front-loads key purpose and behavior.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema or annotations, description is highly complete. Explains response shape, missing nodes, cost scaling, path structure, and recommended usage patterns. Covers all necessary details for correct tool invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 100% description coverage, but description adds significant meaning: default for nodeIds, safe-list property distinction, filter logic (OR/AND), and performance implications of fields and filters. Adds value beyond schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Get detailed information about one or more nodes.' with specific verb and resource. It distinguishes from sibling tools like get_styles or get_components by focusing on node details and supporting recursive traversal.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit usage context: default behavior when nodeIds empty, recommended pairings for different scenarios, and filtering behavior. Lacks explicit alternatives but gives clear guidance on when to use different configurations.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

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

curl -X GET 'https://glama.ai/api/mcp/v1/servers/neozhehan/figma-edit-mcp'

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