Add Shape
photopea_add_shapeAdd a vector shape layer (rectangle or ellipse) to the active document with specified bounds, fill, stroke, and name. Shapes remain editable and scalable without quality loss.
Instructions
Add a vector shape layer (rectangle or ellipse) to the active document. The shape layer becomes the active layer. Shapes are non-destructive and can be resized with transform_layer without quality loss.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"type": "<type>",
"bounds": "<bounds>"
},
"name": "photopea_add_shape"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Name for the shape layer | |
| type | Yes | Shape type to create | |
| bounds | Yes | Shape bounds | |
| fillColor | No | Color as hex string (e.g. #ff0000) | |
| strokeColor | No | Color as hex string (e.g. #ff0000) | |
| strokeWidth | No | Stroke width in pixels |