image_tools_convert
Convert an image to WebP, AVIF, JPEG or PNG, resize it and compress it. Strips EXIF by default, applies EXIF rotation, keeps animation for GIF/WebP sources. Returns the file with before/after sizes. Price: $0.01 USDC via x402, charged only on success. Part of Image tools: Everyday image work for sites and apps: convert and compress to WebP/AVIF/JPEG/PNG, responsive srcset sets with ready markup, colour palettes, pixel diffs for visual regression, SVG to PNG, QR codes, blur placeholders, and an inspection that says what to fix before shipping an image..
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "image_tools_convert"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fit | No | inside: fit within the box, keep aspect; cover: fill the box and crop; contain: fit and pad with background. | inside |
| image | No | Image file as base64 (PNG, JPEG, WebP, AVIF, GIF, TIFF or SVG). | |
| width | No | Target width in pixels. With only one of width/height the other follows the aspect ratio. | |
| format | No | Output format. | webp |
| height | No | ||
| quality | No | Lossy quality. For PNG, under 100 switches to a palette PNG (much smaller). | |
| upscale | No | Allow making the image larger than the source. | |
| imageUrl | No | Link to the image. | |
| lossless | No | WebP/AVIF lossless mode; PNG keeps full colour. | |
| background | No | Colour behind transparency. JPEG has no alpha, so it defaults to white there. | |
| keepMetadata | No | Keep EXIF/ICC. Off by default: strips location and camera data. |