style_item
Change an item's appearance with friendly hex colors; the fields are mapped to the right property for the item type. By type - label/sticky: fillColor=background, textColor, fontSize; shape: fillColor, strokeColor, strokeThickness; connector: strokeColor, strokeThickness. The item type is resolved automatically. Provide at least one field. fillColor "#00000000" removes a fill or a label's background. Colors are hex strings only - "#RRGGBB" (e.g. "#3B82F6"), or "#AARRGGBB" for alpha (alpha first). rgb()/rgba(), hsl() and named colors are rejected. The result may carry warnings: [{itemId, code, message}] for text cut off by its box (TEXT_HEIGHT_TOO_SMALL), text running into other text (TEXT_OVERLAP), text that cannot be read on what is behind it (LOW_CONTRAST), text running past the shape it starts on (OUTSIDE_PARENT_SHAPE) and text a new shape hides (TEXT_COVERED). The write happened; fix what they name before reporting the work as done.
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). Hex only; "#00000000" removes it. |
textColor | string | No | — | Text color (labels/stickies only). Hex only. |
strokeColor | string | No | — | Outline color (shapes and connectors). Hex only. |
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. |
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"]
}
The result may also carry warnings about the layout the write left behind.
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.