get_tree

Returns an outline of a board or of one layer, one line per layer. Start here to find layer ids before you read or change anything.

What it does

A file has two boards: app, which holds the screens, and components, where every top-level layer is a reusable component. get_tree walks one of them, or starts from a single layer, and prints a short line for each layer so you can find the id you need without loading every property. For all the properties of one layer, use get_node.

It only reads. It needs no guidelines hash, and it reads the file from disk on every call, so you always see edits made in Wonderblok.

Arguments

file
Optional. The file to read, by name from list_files or by path. Leave it out when only one file is open, or to use the file in front in Wonderblok.
board
Optional. app (the default) or components. Ignored when node_id is given.
node_id
Optional. The layer to start from. Leave it out for the whole board.
group
Optional. App board only: show only the frames in this group. Use a group id from this tool.
depth
Optional. How many levels below the start to include. Defaults to 2.

What it returns

Plain text, indented two spaces per level. Each line starts with the layer type, its id and its quoted name. After that you may see these, when they apply:

  • text=, icon=, component= and link=, for what the layer shows or points to.
  • hidden, for a layer that is kept in the file but not drawn.
  • at=x,y size=WxH, for any layer that has an x or a y.
  • (+N children), for a layer at the depth limit that has children. Call again with that layer as node_id to open it.

When the app board has groups, frames are listed under a group <id> "<name>" (N frames) line. For the whole app board you also get one annotation line for each title, sticky or link card beside the frames. The last line is revision N once the file has a revision above 0. Pass that number as if_revision to apply_ops to refuse the write if the file changed since.

Example

Call
get_tree { "node_id": "NqMPu", "depth": 1 }
Reply (abbreviated)
frame NqMPu "00 · Concept" at=… size=1440x…  frame … "Head" …  frame … "…" …  …revision …

The ids in the reply are what you pass to other tools, for example as the id of an update op.

Notes

  • A node_id that matches no layer comes back as an error that names the id.
  • Layer ids are stable and unique across the file, so you can keep them between calls.
  • Groups and frames are explained in Files, groups and frames.
  • Before you change anything, read the rules with get_guidelines, then edit with apply_ops.

Was this page helpful?

Edited Nov 8, 2026