Skip to main content

update_item_property

Sets one property of an item to a new value, using the friendly REST property names — e.g. text, fontSize, fillColor, strokeColor, angle, or position = {x,y} / size = {width,height}. The item type is resolved automatically; pass itemType to skip the lookup.

Keys inside position and size are case-insensitive, in both the object form and the string-encoded form.

Tool name: update_item_property

Parameters

ParameterTypeRequiredDefaultDescription
projectIdstringYesTarget project (map) id.
itemIdstringYesId of the item to update.
propertyNamestringYesProperty name, e.g. "text", "fillColor", "angle".
valueanyYesNew value — string, number, boolean, or object as appropriate.
itemTypestringNoAuto-resolvedOne of label, sticky-note, shape, connector, image, web, svg, document.

Common Properties

PropertyValue shapeApplies to
textstring (plain text or HTML)labels, stickies
fontSizenumber ≥ 1labels, stickies
fillColorCSS color stringshapes
strokeColorCSS color stringshapes, connectors
strokeThicknessnumber ≥ 0shapes, connectors
position{ "x": number, "y": number }all items
size{ "width": number, "height": number }all items
isAutoSizeWidthboolean — when true the item ignores size.width and grows on one linelabels, stickies
isAutoSizeHeightboolean — when true the item ignores size.height and grows with its textlabels, stickies
anglenumber (degrees, 0–360)all items

The full per-type field reference is available via get_data_model.

Resizing a label or sticky

A label only honours its size on an axis whose auto-size flag is false, so setting size alone used to have no visible effect — the text kept flowing on one line. Setting size now writes both flags for you, deriving each from the matching dimension:

size valueResult
{ "width": 400, "height": 0 }Wraps at 400, grows downwards with the text
{ "width": 400, "height": 300 }Fixed 400x300 box; text beyond it is clipped
{ "width": 0, "height": 0 }Back to auto-sizing on both axes

Pass isAutoSizeWidth or isAutoSizeHeight in a separate call to override a derived flag; an explicit value always wins over the derived one. Avoid isAutoSizeWidth: false with size.width: 0 — that combination renders nothing.

Returns

{ "updated": true, "itemId": "11aa22bb-...", "propertyName": "text" }

Example

"Rotate the hexagon by 45 degrees."

{
"projectId": "a1b2c3d4-...",
"itemId": "77gg88hh-...",
"propertyName": "angle",
"value": 45
}

For color and font changes, style_item is usually more convenient — it maps fields to the right property per item type automatically.