modify_diagram
Add nodes, remove labels, or connect elements in an existing Excalidraw diagram, saving changes to the same or a new file.
Instructions
Modify an existing .excalidraw diagram.
Args: file_path: Path to existing .excalidraw file add_nodes: Nodes to add: [{"label": "New Node", "color": "green", "x": 100, "y": 100}] remove_labels: Labels of nodes to remove add_connections: New connections: [{"from": "Node A", "to": "Node B"}] output_path: Optional output path (default: overwrite input file)
Returns: Path to the modified file
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file_path": "<file_path>"
},
"name": "modify_diagram"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| add_nodes | No | ||
| file_path | Yes | ||
| output_path | No | ||
| remove_labels | No | ||
| add_connections | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |