get_layout_tree
Retrieves a flat pre-order layout tree for a Figma subtree, including geometry, auto-layout, sizing, and visibility, to inspect structure and diagnose layout issues.
Instructions
Flat geometry dump of a subtree (pre-order): id, name, type, parentId, depth, absolute x/y/width/height (absoluteBoundingBox), absoluteRenderBounds, rotation, visible, and layoutMode/padding/itemSpacing, layoutPositioning, sizing (hug/fill/fixed), constraints where relevant. rootId defaults to the current page. truncated is true when maxNodes was hit.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_layout_tree"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | Target file (fileKey, id or name). Defaults to the most recently active file. | |
| rootId | No | Root node or page id; default current page | |
| maxDepth | No | Max depth below root (default unlimited) | |
| maxNodes | No | Default 2000 | |
| includeHidden | No | Include hidden nodes (default true) |