Skip to main content

create_item

Creates a text item: kind label (auto-sized text) or sticky (a sticky note with a colored background). Returns the new item id.

Tool name: create_item

Parameters

ParameterTypeRequiredDefaultDescription
projectIdstringYesTarget project (map) id.
kindstringYes"label" or "sticky".
textstringYesText content (plain text or HTML).
positionobjectNo{ x: 0, y: 0 }World-coordinate position of the item's top-left, { x, y }.
fontSizenumberNoTheme defaultFont size in points. Must be ≥ 1.
fontFamilystringNoTheme defaultFont family name.
textColorstringNoTheme defaultText color, hex e.g. "#FFFFFF".
backgroundColorstringNoTheme defaultBackground color, hex.
horizontalTextAlignmentstringNo"Left""Left", "Center", or "Right".
verticalTextAlignmentstringNo"Top""Top", "Center", or "Bottom".
parentIdstringNoProject canvasContainer id to place the item under.

Returns

{ "created": true, "itemId": "11aa22bb-...", "kind": "sticky" }

Example

"Add a yellow sticky note that says 'Ship v2 by Friday'."

{
"projectId": "a1b2c3d4-...",
"kind": "sticky",
"text": "Ship v2 by Friday",
"position": { "x": 300, "y": 150 },
"backgroundColor": "#FDE047",
"textColor": "#1F2937"
}

To restyle the item later, use style_item; to change its text or move it, use update_item_property.