modify_diagram
Modify existing Excalidraw architecture diagrams by adding, removing, or updating nodes and connections without recreating the diagram.
Instructions
Modify an existing Excalidraw diagram created by this tool.
Supports iterative editing: add components, remove nodes, update labels, and rewire connections - without recreating the entire diagram.
IMPORTANT: Call get_diagram_info first to understand the current diagram state before making modifications.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Path to the existing .excalidraw file. | |
| operations | Yes | Ordered list of operations. Each dict has: - op: "add_node" | "remove_node" | "update_node" | "add_connection" | "remove_connection" For add_node: - id (str): New node identifier - label (str): Display text - component_type (str, optional): Technology for auto-styling - shape (str, optional): Shape override - color (str, optional): Hex color override - planned (bool, optional): Mark as planned/future (dashed + 60% opacity) - near (str, optional): Place near this existing node id For remove_node: - id (str): Node to remove (also removes its connections) For update_node: - id (str): Node to update - label (str, optional): New label - component_type (str, optional): New component type - color (str, optional): New hex color (pass empty string to clear) - planned (bool, optional): Toggle planned state For add_connection: - from_id (str): Source node id - to_id (str): Target node id - label (str, optional): Edge label For remove_connection: - from_id (str): Source node id - to_id (str): Target node id | |
| theme | No | Color theme for re-rendering. Default: "default" | default |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |