convert_image
Convert images between formats and apply edits such as resizing, compressing, rotating, blurring, sharpening, trimming, and metadata stripping using local input and output paths.
Instructions
Convert/process images. Input: jpg, jpeg, png, webp, gif, avif, tiff, bmp, svg, heic, heif, raw, jp2, jxl. Output: jpg, jpeg, png, webp, gif, avif, tiff, ico, jxl. Supports: resize, compress, rotate, flip, blur, sharpen, normalize, tint, trim, strip metadata, progressive, lossless.
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": {
"inputPath": "<inputPath>",
"outputPath": "<outputPath>"
},
"name": "convert_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fit | No | Resize fit mode (optional) | |
| blur | No | Blur sigma e.g. 1.5 (optional) | |
| flip | No | Flip vertically (optional) | |
| flop | No | Flop horizontally (optional) | |
| tint | No | Hex color tint e.g. '#ff0000' (optional) | |
| trim | No | Trim whitespace/borders (optional) | |
| strip | No | Strip EXIF metadata (optional) | |
| width | No | Resize width in pixels (optional) | |
| height | No | Resize height in pixels (optional) | |
| rotate | No | Rotate degrees clockwise (optional) | |
| density | No | DPI for SVG rasterization (optional, default 72) | |
| quality | No | Quality 1-100 (optional, default 85) | |
| sharpen | No | Apply sharpening (optional) | |
| lossless | No | Lossless WebP/AVIF/JXL (optional) | |
| grayscale | No | Convert to grayscale (optional) | |
| inputPath | Yes | Absolute path to input image | |
| normalize | No | Stretch contrast to full range (optional) | |
| background | No | Background color e.g. '#ffffff' (optional) | |
| outputPath | Yes | Absolute path for output image (include extension) | |
| progressive | No | Progressive JPEG/PNG (optional) | |
| generateIcons | No | Generate icon set 16-512px (optional) |