create_diagram
Generate Excalidraw diagrams from nodes and connections or typed specs, with automatic layout and styling, saved to a .excalidraw file.
Instructions
Create a new Excalidraw diagram of any supported type.
Two input modes:
Graph types (
architecture,flowchart) - passnodesandconnections. The tool handles layout, styling, and rendering; no coordinates needed.Typed diagrams (every other type) - pass
diagram_typeand aspecobject shaped for that type. Calllist_diagram_typesto choose a type andget_diagram_schemato see its spec shape.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spec | No | Type-specific payload. Required for every type other than architecture/flowchart. Every spec accepts optional "title" and "subtitle". Mark 1-2 elements ``"focal": true`` to earn the accent color - marking five erases the signal. | |
| nodes | No | Graph types only. 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" | |
| theme | No | Color theme - "default", "dark", "colorful". Default: "default" | default |
| direction | No | Layout direction for graph types - "LR" (left-right), "TD" (top-down), "BT" (bottom-up), "RL" (right-left). | LR |
| connections | No | Graph types only. 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") | |
| diagram_type | No | One of the types from ``list_diagram_types``. Default "architecture". Pick the type that matches what the reader needs to learn, not the one that is easiest to fill in. | architecture |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |