Skip to main content

connect_items

Draw a connector (line/arrow) between two existing items. Defaults to a straight line with an arrow at the end. Connector or arrow shape? connect_items draws a thin line/arrow attached to two items that follows them when they move - use it for relationships and flow edges. A block arrow shape (create_shape, e.g. RightArrow) is a standalone filled area, not attached to anything - use it between process steps, as a direction cue, callout or header, and style it like any shape (fillColor, strokeColor, a text label on top). Colors are hex strings only - "#RRGGBB" (e.g. "#3B82F6"), or "#AARRGGBB" for alpha (alpha first). rgb()/rgba(), hsl() and named colors are rejected. Returns the new connector id.

Tool name: connect_items

Parameters​

ParameterTypeRequiredDefaultDescription
projectIdstringYes—Target project (map) id.
sourceItemIdstringYes—Id of the item the connector starts at.
targetItemIdstringYes—Id of the item the connector ends at.
typeenumNo"Straight"Line type: "Straight", "Angled" (from side to side with right-angle bends), or "Curved".
strokeColorstringNoTheme defaultLine color, hex.
strokeThicknessnumberNo3Line thickness in px. Must be ≥ 0.
startDecoratorenumNo"None"Endpoint marker at the start: "None", "Arrow", "ArrowLine", or "Circle".
endDecoratorenumNo"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).

A connector is attached to both items and follows them when they move — right for relationships and flow edges. When it is created, each end is placed in the middle of the side that faces the other item (a turned item's own side); the ends keep those places when the items move later. For a big filled arrow that is a design element of its own (between process steps, a direction cue, a header), place a block arrow shape with create_shape instead.