Skip to main content
Glama

add_edge

Connects two nodes in a draw.io diagram with an edge or arrow. Supports multiple edge styles and precise entry/exit points for clear, readable layouts.

Instructions

Add a connection (edge/arrow) between two nodes in a draw.io diagram.

LAYOUT TIPS for readable diagrams:

  • Use "curved" edgeStyle when multiple edges connect the same pair of nodes, combined with different exitPoint/entryPoint to separate them visually.

  • Use "orthogonal" for clean right-angle routing in architecture diagrams.

  • Use exitPoint/entryPoint to control WHERE on a node the edge connects (e.g. "left", "right", "topLeft25", "bottomRight75") — this prevents edges from stacking on top of each other.

  • For bidirectional flows, use two separate edges with offset connection points (e.g. edge A: exitPoint="rightTop25" → entryPoint="leftTop25", edge B: exitPoint="leftBottom75" → entryPoint="rightBottom75").

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoCustom ID for the edge
labelNoLabel for the edge
styleNoCustom draw.io style string
filePathYesPath to the .drawio file
sourceIdYesID of the source node
targetIdYesID of the target node
edgeStyleNoPredefined edge style. Available: straight, orthogonal, orthogonalSharp, curved, entityRelation, elbowHorizontal, elbowVertical, isometric, arrow, openArrow, dashed, dotted, bidirectional, noArrow, orthogonalDashed, curvedDashed, orthogonalBidirectional, curvedBidirectional, orthogonalNoArrow
exitPointNoWhere the edge exits the source node. Available: top, bottom, left, right, topLeft, topRight, bottomLeft, bottomRight, topLeft25, topRight75, bottomLeft25, bottomRight75, leftTop25, leftBottom75, rightTop25, rightBottom75. Use offset variants (e.g. topLeft25, rightBottom75) when multiple edges share a node to avoid overlap.
pageIndexNoPage index (0-based, default: 0)
entryPointNoWhere the edge enters the target node. Available: top, bottom, left, right, topLeft, topRight, bottomLeft, bottomRight, topLeft25, topRight75, bottomLeft25, bottomRight75, leftTop25, leftBottom75, rightTop25, rightBottom75. Use offset variants to separate parallel edges.
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must disclose behavioral effects. It only says 'Add a connection' and discusses layout tips, but omits critical details such as file modification, error handling, or validation of node IDs. The layout tips are about visual configuration, not about the tool's operational behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized: a clear one-sentence purpose followed by a structured 'LAYOUT TIPS' section. Each tip is actionable and specific, though the section is somewhat lengthy. The overall structure is logical and front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 10 parameters and no output schema, the description covers the core purpose and offers substantial guidance on edge styles, connection points, and bidirectional flows. It doesn't address error conditions or file-level behavior, but for a tool that primarily adds an edge with visual parameters, it is fairly complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema covers all params, so baseline is 3. The description goes beyond the schema by providing concrete guidance on edgeStyle (e.g., 'curved' for multiple edges, 'orthogonal' for architecture diagrams) and exitPoint/entryPoint (e.g., offset variants to prevent overlap). This adds significant practical meaning to the schemas descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific action and resource: 'Add a connection (edge/arrow) between two nodes in a draw.io diagram.' This clearly distinguishes it from sibling tools like add_node (which creates nodes) and other operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides extensive layout tips (curved vs orthogonal, exitPoint/entryPoint offsets) but these are guidance for parameter choices, not for when to use this tool versus alternatives like batch_add_elements or check_connection. There is no explicit when/when-not guidance, so it only implies appropriate usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/abossard/drawio-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server