Skip to main content

style_item

Changes an item's appearance with friendly color fields; each field is mapped to the right underlying property for the item's type. The item type is resolved automatically. Provide at least one style field.

Tool name: style_item

Parameters

ParameterTypeRequiredDefaultDescription
projectIdstringYesTarget project (map) id.
itemIdstringYesId of the item to style.
fillColorstringNoFill color (shapes) or background color (labels/stickies).
textColorstringNoText color (labels/stickies only).
strokeColorstringNoOutline color (shapes and connectors).
strokeThicknessnumberNoOutline width in px (shapes and connectors). Must be ≥ 0.
fontSizenumberNoFont size in points (labels/stickies only). Must be ≥ 1.

Colors are CSS strings, e.g. "#00FF00" or "rgba(0,255,0,0.5)".

Field Mapping by Item Type

Item typeApplicable fields
label / sticky-notefillColor (background), textColor, fontSize
shapefillColor, strokeColor, strokeThickness
connectorstrokeColor, strokeThickness

Fields that don't apply to the item's type are ignored; if none apply, the call returns an error.

Returns

{
"updated": true,
"itemId": "77gg88hh-...",
"itemType": "shape",
"applied": ["fillColor", "strokeThickness"]
}

Example

"Make the hexagon red with a thicker outline."

{
"projectId": "a1b2c3d4-...",
"itemId": "77gg88hh-...",
"fillColor": "#EF4444",
"strokeThickness": 4
}

For properties beyond styling (text, position, size, angle, …), use update_item_property.