krita_paint_shape
Draw a rectangle or ellipse in a Krita document using explicit brush settings, with optional solid foreground fill. Operates on active pixel brush with no selection and restores brush context after finishing.
Instructions
Paint one native rectangle/ellipse with explicit brush settings and optional solid foreground fill. Requires active document, pixel brush and no selection. Restores brush context, waits for native completion. Reuse operation_id.
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": {
"instance_id": "<instance_id>",
"operation_id": "<operation_id>",
"document_id": "<document_id>",
"node_id": "<node_id>",
"shape": "<shape>",
"x": "<x>",
"y": "<y>",
"width": "<width>",
"height": "<height>",
"preset_id": "<preset_id>",
"size_px": "<size_px>",
"opacity": "<opacity>",
"color": "<color>"
},
"name": "krita_paint_shape"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | ||
| y | Yes | ||
| fill | No | ||
| color | Yes | ||
| shape | Yes | ||
| width | Yes | ||
| height | Yes | ||
| node_id | Yes | ||
| opacity | Yes | ||
| size_px | Yes | ||
| preset_id | Yes | ||
| document_id | Yes | ||
| instance_id | Yes | ||
| operation_id | Yes |