Skip to main content

connect_items

Draws a connector (line/arrow) between two existing items. Defaults to a curved line with an arrow at the end. Returns the new connector id.

Tool name: connect_items

Parameters

ParameterTypeRequiredDefaultDescription
projectIdstringYesTarget project (map) id.
sourceItemIdstringYesId of the item the connector starts at.
targetItemIdstringYesId of the item the connector ends at.
typestringNo"Curved"Line type: "Straight", "Angled", or "Curved".
strokeColorstringNoTheme defaultLine color, hex.
strokeThicknessnumberNo3Line thickness in px. Must be ≥ 0.
startDecoratorstringNo"None"Endpoint marker at the start: "None", "Arrow", "ArrowLine", or "Circle".
endDecoratorstringNo"ArrowLine"Endpoint marker at the end: "None", "Arrow", "ArrowLine", or "Circle".
parentIdstringNoProject canvasContainer id to place the connector under.

Item ids come from get_project or from the create tools' results.

Returns

{ "created": true, "connectorId": "99ii00jj-..." }

Example

"Connect the 'Idea' sticky to the 'In Progress' shape with a straight arrow."

{
"projectId": "a1b2c3d4-...",
"sourceItemId": "11aa22bb-...",
"targetItemId": "77gg88hh-...",
"type": "Straight"
}

To restyle the connector afterwards, use style_item (strokeColor, strokeThickness).