rotate
Rotate images clockwise, save to new file, with options to expand canvas or crop overflow.
Instructions
Rotate an image clockwise by a number of degrees and write it to a NEW file (source unchanged). With expand=true (the default) the canvas is enlarged so no corners are clipped; set expand=false to keep the original canvas size and crop the overflow. Returns the output path and the angle applied.
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": {
"path": "<path>",
"out": "<out>",
"degrees": "<degrees>"
},
"name": "rotate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| out | Yes | Output image path. A new file is created; the source is left untouched. | |
| path | Yes | Source image path. | |
| expand | No | If true (default), grow the canvas to fit the rotated image; if false, keep original size and crop overflow. | |
| degrees | Yes | Rotation angle in degrees, clockwise. |