# Mindmaps · nodes and depth

A Mindmap is read back as an ordered tree of nodes and saved as OPML 2.0. A map holds at most 300 nodes, counting the central topic.

Checked 2026-12-05 · https://xale.app/docs/ai/mindmaps-nodes-and-depth

## Reading a Mindmap

`xale_read_mindmap` returns the nodes in tree order, the central topic first:

| Field | What it is |
| --- | --- |
| `id` | The node's id |
| `parentId` | Its parent; `null` for the central topic |
| `title` | Its text. A read cuts it at 1,000 characters; a node's text is limited to 300 when it's saved (see Limits) |
| `depth` | 0 for the central topic, 1 for a main branch, and so on |
| `taskId` | The Task it's linked to, if any |
| `link` | A web link, if any |

`maxNodes` sets how many come back: 200 by default, 300 at most. Titles share 16,000 characters in all. A node's stored border colour is `style.customColor` when present. To draw a saved map directly, call [`xale_render_mindmap`](https://xale.app/docs/ai/tools/xale_render_mindmap) with `mapId`. `truncated: true` says nodes or titles were cut. Find maps with `xale_find_mindmaps` (name, Areas).

## Saving a Mindmap

`xale_save_mindmap` takes `opml`, OPML 2.0:

```xml
<opml version="2.0" xmlns:xale="https://xale.app/ns/opml/1">
  <head><title>Which city for the offsite</title></head>
  <body>
    <outline text="Which city for the offsite">
      <outline text="Lisbon"><outline text="Direct flights"/></outline>
      <outline text="Porto" xale:done="true"/>
    </outline>
  </body>
</opml>
```

One top-level outline is the central topic and names the map; several become branches under the `<title>`. The format, with its optional `xale:` attributes, is on [Mindmap format · OPML](https://xale.app/docs/ai/mindmap-format-opml).

## Growing and editing

| To | Use |
| --- | --- |
| Add a node, with optional sub-nodes, under any node | `xale_add_mindmap_nodes` (`mapId`, `parentNodeId`, `title`, `subNodes`) |
| Rename a node | `xale_rename_mindmap_node` |
| Tick or untick a node | `xale_tick_mindmap_node`; a node linked to a Task completes or reopens it |
| Delete a branch | `xale_prepare_removal` with `delete_mindmap_branch`, then the person's yes. It can't be undone. |

## Limits

| Limit | Value |
| --- | --- |
| Nodes in one map | 300, counting the central topic |
| One node's text | 300 characters |
| Depth | 20 levels |
| Mindmaps on one account (Pro) | 1,000 |

For a bigger map, save the main branches first, then add the rest with `xale_add_mindmap_nodes`.

## Related

- For people: [How do Mindmaps work in Xale?](https://xale.app/help/mindmaps-first-look)
- For people: [How do I add branches to a mind map in Xale?](https://xale.app/help/mindmap-branches-add-and-move)
- Tools: [xale_read_mindmap](https://xale.app/docs/ai/tools/xale_read_mindmap)
- Tools: [xale_save_mindmap](https://xale.app/docs/ai/tools/xale_save_mindmap)
- Tools: [xale_add_mindmap_nodes](https://xale.app/docs/ai/tools/xale_add_mindmap_nodes)
- Tools: [xale_rename_mindmap_node](https://xale.app/docs/ai/tools/xale_rename_mindmap_node)
- Tools: [xale_tick_mindmap_node](https://xale.app/docs/ai/tools/xale_tick_mindmap_node)
- Read next: [Mindmap format · OPML](https://xale.app/docs/ai/mindmap-format-opml)
- Read next: [Research and decisions · as a Mindmap](https://xale.app/docs/ai/research-and-decisions-as-a-mindmap)
