convert
Convert images between PNG, JPG, WebP, GIF, BMP, TIFF, ICO, and AVIF/HEIC while handling transparency, animation, and CMYK/16-bit color for compatible output files.
Instructions
Convert an image to another format: png, jpg, webp, gif, bmp, tiff, ico, and avif / heic when this install supports them (an error says so if not).
Transparency going to jpg or bmp is flattened onto background (a name like 'white'
or hex like '#ff00ff'; the result says so). Animated GIF/WebP/PNG stay animated when the
target can hold an animation, otherwise the first frame is used and the result says so.
CMYK and 16-bit images are converted to RGB/8-bit. lossless=true applies to webp.
Output is photo.webp next to the input (photo.converted.png if the format is unchanged)
unless output= is given; existing files are never replaced unless overwrite=true.
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>",
"format": "<format>"
},
"name": "convert"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| format | Yes | ||
| output | No | ||
| preview | No | ||
| quality | No | ||
| lossless | No | ||
| overwrite | No | ||
| allow_huge | No | ||
| background | No | white | |
| keep_metadata | No |