Convert Image Tool
convert_imageConvert a picture to another format (jpeg, png, webp, gif, bmp, avif, ico, tiff), optionally resized (width/height/max_side), rotated, flipped, with a quality, or compressed to a target size in KB. Full quality and original size unless asked otherwise. Send the file as file (attached in the chat), url or base64. Returns download_page when done.
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": {
"output_format": "<output_format>"
},
"name": "convert_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fit | No | With width and height: stretch, or contain (fit inside with borders). | |
| url | No | A public http(s) link to the file. Use this, file or base64. | |
| file | No | A file attached in the chat (filled in by the app; use this instead of base64 when the user attached the file). | |
| width | No | New width in pixels. | |
| base64 | No | The file as base64 (or a data: URL), for small files only. Prefer file or url. | |
| height | No | New height in pixels. | |
| rotate | No | Clockwise rotation. | |
| quality | No | 1–100 for lossy formats; default 100. | |
| filename | No | Original file name, e.g. photo.heic (helps to recognise the input). | |
| max_side | No | Shrink so the longest side is at most this many pixels (never enlarges). | |
| target_kb | No | Compress to at most this size in KB (lowers quality, then size if needed). | |
| background | No | #rrggbb used where transparency must be filled (e.g. PNG → JPEG). | |
| flip_vertical | No | Mirror top–bottom. | |
| output_format | Yes | Target: jpeg (jpg), png, webp, gif, bmp, avif, ico or tiff. | |
| flip_horizontal | No | Mirror left–right. |