add_shape
Add a shape to a specific slide in a LibreOffice document. Choose rectangle, rounded rectangle, ellipse, or line, and set position, size, fill color, gradient, border, and optional centered text.
Instructions
Draw a shape: shape is rect|round|ellipse|line. x/y/w/h are percent of
the slide. fill is hex (or null for none); pass fill2 for a gradient at
angle. line/line_width add a border (1/100 mm). Optional centered
text with its own color/size/bold. corner (1/100 mm) rounds "round"
rects.
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": {
"doc_id": "<doc_id>",
"slide": "<slide>",
"x": "<x>",
"y": "<y>",
"w": "<w>",
"h": "<h>"
},
"name": "add_shape"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| h | Yes | ||
| w | Yes | ||
| x | Yes | ||
| y | Yes | ||
| fill | No | #c2410c | |
| line | No | ||
| text | No | ||
| angle | No | ||
| fill2 | No | ||
| shape | No | rect | |
| slide | Yes | ||
| corner | No | ||
| doc_id | Yes | ||
| text_bold | No | ||
| text_size | No | ||
| line_width | No | ||
| text_color | No | #ffffff |