tree
Lists node IDs, types, and names under a chosen root in a saved .fig file to locate unknown pages and frames.
Instructions
List node ids, REST types (as in nodes and find) and names under a chosen root. A shallow outline locates pages and frames when their names are unknown; find searches known names or visible text directly.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file": "<file>"
},
"name": "tree"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | the saved .fig: a local path (absolute recommended), or gs://bucket/object using gcloud; remote sources are unavailable with --root | |
| json | No | nested {id,type,name,size,visible,layoutMode,children} JSON instead of indented text (about 1.7x larger); size is the local pre-rotation [width,height] (absent on the document and pages), visible appears only when false and layoutMode only on auto-layout frames; nodes on a page or in a section add firstText, their first visible stored text (breadth-first, instances not expanded, at most 200 characters), which tells a canvas label (a box around one line of text) from a screen | |
| node | No | a stored root id; default the whole document; use inspect for instance sublayers | 0:0 |
| depth | No | levels to list below the root | |
| topFrames | No | list only the screens under the root, at any depth: FRAME, COMPONENT, COMPONENT_SET and INSTANCE children of a page or of a section on one (groups, shapes and text are not screens; internal pages are skipped unless they are the root); depth does not apply; text lines start with the id, as nodes/export/bundle frame lists read them; with json, a flat array of entries without children (with firstText), adding page and, inside a section, section ids |