tree_to_mindmap
Scan a directory tree and generate a JSON array of mindmap nodes, with directories as categories and files as leaves, skipping hidden and VCS files.
Instructions
Scan a directory tree and return a JSON array of simplified mindmap nodes.
The returned JSON is ready to use with replace_mindmap or add_nodes. Order_index is implicit (1-based position in the array). Parent values are pre-computed — no manual index tracking needed.
Directories become category nodes (size_box=1), files become leaf nodes. Hidden files, VCS dirs (.git, .github, pycache, node_modules, etc.) are skipped automatically.
Args: root_path: absolute path to the directory to scan root_title: title for the root node (empty = use directory name)
Returns: JSON string — array of simplified nodes ready for replace_mindmap.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root_path | Yes | ||
| root_title | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |