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
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
projectId | string | Yes | — | Target project (map) id. |
itemId | string | Yes | — | Id of the item to style. |
fillColor | string | No | — | Fill color (shapes) or background color (labels/stickies). |
textColor | string | No | — | Text color (labels/stickies only). |
strokeColor | string | No | — | Outline color (shapes and connectors). |
strokeThickness | number | No | — | Outline width in px (shapes and connectors). Must be ≥ 0. |
fontSize | number | No | — | Font 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 type | Applicable fields |
|---|---|
label / sticky-note | fillColor (background), textColor, fontSize |
shape | fillColor, strokeColor, strokeThickness |
connector | strokeColor, 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.