# UIHelper.getTree

Inspect the nested UI/accessibility hierarchy.

```js
ui.getTree()
```

## Arguments

No arguments.

## Returns

Nested tree object; traversal is bounded.

## Example

```js
console.log(JSON.stringify(UIHelper.getTree()));
```

## Notes

Use targeted queries inside loops; a full tree is more work and can be incomplete for custom canvas content.

[All JavaScript APIs](https://mcp.applesauceos.com/doc/api.md) · [Automation playbook](https://mcp.applesauceos.com/doc/ai.md)
