nodes.createFlowchart
Create visual flowcharts with nodes and edges to map processes, decisions, and workflows for clear documentation and analysis.
Instructions
Create a flowchart with nodes and edges on the canvas. Returns nodeIds mapping for subsequent modifications via nodes.updateFlowchart.
Nodes: { id, name, shape?, color? }
shape: rounded (default), diamond (decisions), pill (start/end), cylinder (database), parallelogram (I/O)
color: CSS name (blue, green, red, amber) or hex. Use red for problems, green for success.
Edges: { from, to, fromHandle?, toHandle?, label? }
handles: "left", "right", "top", "bottom"
For decisions: fromHandle "right" for Yes/true, "bottom" for No/false
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodes | Yes | Array of nodes: [{id, name, shape?, color?}] | |
| edges | Yes | Array of edges: [{from, to, fromHandle?, toHandle?, label?}] | |
| startPosition | No | Starting position {x, y} for the flowchart | |
| spacing | No | Gap between nodes in pixels (default: 60) | |
| autoLayout | No | Run dagre auto-layout after creating nodes for optimal positioning (default: false) |