image_compress
Make an image file smaller from freedailypro: same format unless format is given (png, jpeg, webp, avif, gif, tiff), quality 1-100 for JPEG/WebP/AVIF (default 80), PNG stays lossless unless quality is below 100 (then a smaller 256-colour palette), metadata removed unless stripMetadata is false, optional maxWidth/maxHeight (never enlarges). If the file cannot be made smaller in its own format the original bytes come back unchanged and the note says so
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": {
"fileBase64": "<fileBase64>"
},
"name": "image_compress"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | png, jpeg (or jpg), webp, avif, gif, tiff, bmp or ico; image/... types also work. Default: the same format as the input | |
| quality | No | 0-1 (for example 0.8) or 1-100 (for example 80); JPEG, WebP, AVIF, and palette PNG | |
| lossless | No | WebP/AVIF lossless | |
| maxWidth | No | ||
| maxHeight | No | ||
| fileBase64 | Yes | ||
| stripMetadata | No | Remove EXIF/GPS/colour-profile data. Default true | |
| backgroundColor | No | Fill for transparent areas (always used for JPEG), e.g. '#ffffff' or 'white' |