create_shape
Places a geometric shape (rectangle, ellipse, arrow, star, …) on a project canvas. Position is the world-coordinate top-left; size is the bounding box. Returns the new item id.
Tool name: create_shape
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
projectId | string | Yes | — | Target project (map) id. |
shape | string | Yes | — | Shape type from the supported set below. |
position | object | Yes | — | World-coordinate top-left of the shape, { x, y }. |
size | object | No | { width: 120, height: 120 } | Bounding box in world coordinates, { width, height }. |
fillColor | string | No | "#3B82F6" | Fill color, hex. |
strokeColor | string | No | Theme default | Outline color, hex. |
strokeThickness | number | No | 2 | Outline width in px. Must be ≥ 0. |
parentId | string | No | Project canvas | Container id to place the shape under. |
Supported Shapes
Rectangles
Rectangle, RoundedRectangle, OneRoundCornerRectangle, TwoSameSideRoundCornerRectangle, TwoDiagonalRoundCornerRectangle, TwoSameSideSnipCornerRectangle, TwoDiagonalSnipCornerRectangle, OneSnipCornerRectangle, OneSnipOneRoundCornerRectangle
Basic shapes
Ellipse, Donut, Triangle, RightTriangle, Diamond, Parallelogram, Trapezoid, Pentagon, Hexagon, Heptagon, Octagon, Decagon, Dodecagon, Frame, HalfFrame, Corner, Plus, Plaque, Heart, LightningBolt
Stars
Star4, Star5, Star6
Arrows
RightArrow, LeftArrow, UpArrow, DownArrow, LeftRightArrow, UpDownArrow, NotchedRightArrow, StripedRightArrow, QuadArrow, LeftRightUpArrow, DirectionArrow, DirectionArrowRight, DirectionArrowLeft
The same list is available at runtime via get_data_model.
Returns
{ "created": true, "itemId": "77gg88hh-...", "shape": "Hexagon" }
Example
"Draw a green hexagon next to the sticky note."
{
"projectId": "a1b2c3d4-...",
"shape": "Hexagon",
"position": { "x": 600, "y": 150 },
"size": { "width": 160, "height": 140 },
"fillColor": "#22C55E"
}
To recolor the shape later, use style_item.