Get design context
figma_get_design_contextRetrieve a Figma node tree with layout, styles, variables, and components for AI agents to build accurate designs from the open file.
Instructions
READ THIS BEFORE YOU BUILD OR CODE. The design as a designer sees it: one tree with, per node, size, position, auto-layout (gap, padding, alignment, wrap row gap, grid tracks, hug/fixed/fill, min/max), constraints, fills (gradient angles, image hashes) / strokes / effects / radius, text with its styled runs and links, styles and variables BY NAME, explicit variable modes, and an instance's component with its keys. stylesUsed / variablesUsed / componentsUsed list the tokens and components met, with ids and keys. FigJam: sticky, shape, connector (endpoints as the connector tools write them), table cells and code blocks, plus connectors, the board's edges. Slides: each slide's row, column and index. No nodeId: every selected layer (roots), else the page — in a deck the focused slide, else its outline; scope says which. Bounded by maxNodes: truncated: true and nextCursor return the rest. Text is cut at maxTextChars.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| depth | No | Levels to descend: 0 is the node alone. Default 8 (a whole screen). | |
| cursor | No | The nextCursor of a truncated call, unchanged. | |
| nodeId | No | Subtree root: node id or a Figma link. Defaults to the selection, then the current page (in Slides the focused slide). | |
| session | No | Optional sessionId or file name, to pick a Figma file when more than one is connected. | |
| absolute | No | Add `abs` per node: its box on the page (x/y are relative to the parent). Default false. | |
| maxNodes | No | Stop after this many nodes. Default 500. | |
| includeCss | No | Per-node CSS from Figma's inspect panel (getCSSAsync). Default false; slower. | |
| maxTextChars | No | Characters of text shown per node. Default 400. | |
| includeStyles | No | Style names, text runs and instance components. Default true. | |
| maxTableCells | No | FigJam table cells read per table before it is cut (tableNote). Default 500. | |
| includeGeometry | No | Size, position, auto-layout, constraints, radius, opacity. Default true. | |
| includeVariables | No | Bound variable names and values, explicit modes. Default true. | |
| includeAnnotations | No | Per-node annotations (label, category). Default true. | |
| maxChildrenPerNode | No | Cap on children per node. Default 50. |