Create a laid-out, connected diagram
create_diagramBuild a complete flowchart or graph in one call. Nodes are laid out in layers and wired with connectors, preventing overlapping shapes.
Instructions
Build a complete flowchart or graph in one call: nodes are placed with a layered layout, then wired together with connectors. This is the preferred tool for any multi-node diagram — it avoids the overlapping shapes you get from placing nodes by hand.
Refer to nodes by your own key strings; edges use those same keys.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | Top-left x. Defaults to free space near the viewport. | |
| y | No | Top-left y. Defaults to free space near the viewport. | |
| edges | No | Directed edges between node keys. Unknown keys are reported, not fatal. | |
| nodes | Yes | ||
| style | No | Render nodes as FigJam shapes (diagrams) or sticky notes (brainstorms). | shapes |
| gapMain | No | Spacing between layers, along the flow axis. | |
| gapCross | No | Spacing between siblings, across the flow axis. | |
| direction | No | Flow direction of the layout. | right |
| sectionName | No | When set, wrap the diagram in a named section. |