Rotate image
rotate_imageRotate a local image by any angle (clockwise for positive values), optionally auto-orient EXIF first, and save the result.
Instructions
Rotate a local image by an arbitrary angle (clockwise for positive values), optionally applying EXIF auto-orientation first, and save the result.
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": {
"image": "<image>"
},
"name": "rotate_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| angle | No | Rotation angle in degrees, clockwise for positive values. If omitted, only EXIF auto-orientation is applied. | |
| image | Yes | Absolute path to a local image on the machine running this MCP server. | |
| quality | No | Encoder quality (1-100). Applies to JPEG, WebP, AVIF and TIFF output. | |
| lossless | No | Use lossless encoding where supported (WebP and AVIF). | |
| file_name | No | Optional base file name; path separators are not allowed. The actual image format determines the extension. When multiple outputs are produced, -1, -2, ... suffixes are appended. Existing files are never overwritten. | |
| background | No | CSS color used as the background, for example #ffffff or transparent. | |
| output_dir | No | Absolute directory where the output file is saved. Defaults to IMG_OUTPUT_DIR, or ~/img-output. The directory is created automatically. | |
| auto_orient | No | Apply EXIF orientation before rotating. Defaults to true. | |
| output_format | No | Output image format. PNG, JPEG, WebP, AVIF, TIFF and GIF are supported. | |
| compression_level | No | PNG compression level (0-9); higher is smaller and slower. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| image | Yes | ||
| source | Yes | ||
| details | No | ||
| operation | Yes |