Overview
Theget_structure MCP tool extracts the hierarchical structure and geometric properties of Figma nodes. It provides a compact outline of the design tree, useful for understanding layout, identifying nodes for code generation, or debugging auto-layout issues.
This is an MCP (Model Context Protocol) tool used by AI assistants. For plugin development, see Query Helpers.
Parameters
Optional node ID to outline. Defaults to the current single selection. Useful when auto-layout hints are none/inferred or you need explicit geometry for refactors.
Response
Array of root nodes in the structure outline.
Example Request
Example Response
Payload Optimization
The tool automatically compacts the structure to fit within MCP payload limits:Node Limiting
If the full structure exceeds the target payload size (~15% of max), the tool progressively reduces the node count:
- Step 1: 240 nodes
- Step 2: 180 nodes
- Step 3: 140 nodes
- Step 4: 100 nodes
- Step 5: 70 nodes
- Step 6: 50 nodes
Use Cases
Understanding Layout Hierarchy
Useget_structure to understand the nesting and organization of a design before generating code:
Identifying Target Nodes
Find specific nodes by examining the structure, then use their IDs withget_code:
- Call
get_structureto see the full tree - Identify the target node ID from the outline
- Pass that ID to
get_codefor precise code generation
Debugging Auto-Layout
When auto-layout hints are unclear (none/inferred),get_structure provides explicit coordinates:
Validating Responsive Designs
Check dimensions across different breakpoints or device frames:Plugin Query Helpers
For plugin development, TemPad Dev provides query helpers to search the design tree:See Also
get_code
Generate code from designs
Query Types
Plugin query API reference