figma_get_tree
Get a compact outline of a Figma file's layer tree from a local .fig or figma.com URL, showing IDs, types, names, sizes, and hints to inspect structure and choose nodes.
Instructions
Compact outline of the layer tree (id, type, name, size, hints such as ready for dev). Omit node_id for all pages. The first line is a header, '# ' followed by a JSON object holding its date (see below); the outline starts on the second line. max_nodes goes to one level before the next (pages, then top-level layers, then what is under them), so a large first section cannot crowd out later pages. A branch cut short ends in a '- ... N more children' line, a layer whose children were all left out says '(N children)', and the last line says it was truncated; when a level could not give each of its layers one line, it is left out whole and the last line says so instead: 'level 2 not shown: 40 layers have children, 30 of 400 lines left; open one with node_id, or pass max_nodes 450' (levels counted as depth counts them). A layer drawn only with vector shapes, however they are grouped, is one line counting them all, '(27 vectors)': pass its node_id to open it. Dated by exportedAt and account, or fileModifiedAt for a file read from disk, as the server's instructions say (figma-reader help on the command line).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | A local .fig path, a Figma file key or a figma.com/design/... URL (see the server's instructions, or figma-reader help) | |
| depth | No | Levels of children below the start node (default 2). With no node_id the start is the document, whose pages are level 0, so the default shows three: pages, their top-level layers, and one level under those | |
| node_id | No | Start node id like 12:34 (or 12-34) | |
| refresh | No | Export the live file again rather than read a local or cached copy (see the server's instructions, or figma-reader help) | |
| max_nodes | No | Lines to spend (default 400), a level at a time: a level that does not fit is shared evenly between its parents, and the levels under it are not shown |