add-edge
Create connections between diagram elements in Draw.io to establish relationships and define flow between components.
Instructions
This tool creates an edge, sometimes called also a relation, between two vertexes (cells).
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": {
"source_id": "<source_id>",
"target_id": "<target_id>"
},
"name": "add-edge"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source_id | Yes | Source ID of a cell. It is represented by `id` attribute. | |
| target_id | Yes | Target ID of a cell. It is represented by `id` attribute. | |
| text | No | Text content placed over the edge cell | |
| style | No | Semi-colon separated list of Draw.io visual styles, in the form of `key=value`. Example: `edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;` | edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0; |