create_diagram
Create Excalidraw diagrams from node and connection data. Define nodes with optional styling; the tool automatically layouts and renders the diagram.
Instructions
Create a new Excalidraw diagram from structured node and connection data.
The LLM provides a relationship map - this tool handles layout, styling, and rendering. No need to specify coordinates.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodes | Yes | List of nodes. Each dict has: - id (str, required): Unique identifier - label (str, required): Display text - component_type (str, optional): Technology name for auto-styling (e.g., "kafka", "postgresql", "redis", "nginx", "kubernetes"). If omitted, the label is used for auto-detection. - shape (str, optional): Override shape - "rectangle", "diamond", "ellipse", "circle", "stadium", "parallelogram" - color (str, optional): Hex color (e.g. "#6366f1") to override the auto-detected background fill. Stroke is darkened automatically. - planned (bool, optional): If true, render as a planned/future element (dashed stroke + 60% opacity). Default: false. | |
| connections | Yes | List of connections. Each dict has: - from_id (str, required): Source node id - to_id (str, required): Target node id - label (str, optional): Edge label text - style (str, optional): "solid", "dashed", "dotted", "thick" | |
| output_path | Yes | File path to save the .excalidraw file (e.g., "./arch.excalidraw") | |
| direction | No | Layout direction - "LR" (left-right), "TD" (top-down), "BT" (bottom-up), "RL" (right-left). Default: "LR" | LR |
| theme | No | Color theme - "default", "dark", "colorful", "professional". Default: "default". "professional" uses clean lines (no hand-drawn effect) and Helvetica font. | default |
| subgraphs | No | Optional list of groups (supports nesting). Each dict has: - id (str, required): Group identifier - label (str, required): Display label for the container - node_ids (list[str], required): Direct node ids inside this group - child_ids (list[str], optional): IDs of nested child subgroups. Parent containers automatically wrap around their children. - component_type (str, optional): Technology for container icon (e.g., "gke" or "googlecloud" shows a GCP logo top-right). Useful for multi-cloud diagrams. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |