add_nodes
Append new nodes to an existing mindmap using a simplified JSON format. Ideal for incremental updates to mindmap structures.
Instructions
Append nodes to an existing mindmap (simplified format).
Unlike sync_nodes which replaces everything, add_nodes reads the existing mindmap, appends the new nodes, and syncs the full set.
Simplified node format (JSON string): [ {"title": "Node 1", "parent": 0, "color": "0xFF7A8FF5"}, {"title": "Node 2", "parent": 1, "color": "0xFFFF6F91"}, {"title": "Node 3", "parent": 1} ]
Fields:
title (required): node title
parent (required): order_index of the parent node (0 = root)
color (optional): hex color (default: 0xFF7A8FF5)
pos_x, pos_y (optional): canvas position (default: 0)
size_box (optional): 0=normal, 1=category, 2=root
bold, italic, underline (optional): text style
line_type (optional): 0=curve, 1=rounded, 2=square
line_style (optional): 0=solid, 1=dashed
stroke_width, dot_radius, radius, border_size, label_size (optional)
icon_id (optional): icon ID
active_bg_colors (optional): active background colors
descriptions (optional): descriptive text
free_links (optional): list of order_index for free links. ONLY use to close a cycle (e.g. topology A→B→C→A). Do NOT use in pure tree structures (file trees, doc trees, org charts). One free_link per cycle max.
spacing_h (optional): horizontal spacing multiplier 0-10 (default: 1). 0=1 cell gap (60px), 1=2 cells (120px), etc.
spacing_v (optional): vertical spacing multiplier 0-10 (default: 0)
is_write_children (optional): propagate style to children (default: false)
Auto-positioning: when free_links are present, new nodes are auto-positioned using a hierarchical tree layout (retrospective mode). When no free_links, positions stay at default (0,0) and the Flutter client handles layout.
UID and order_index are assigned automatically after existing nodes. All other fields are filled with application defaults.
Args: id_mindmap: Mindmap ID nodes: JSON string — array of simplified nodes
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodes | Yes | ||
| id_mindmap | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |