Image Resize
image_resizeDownload an image from a URL and resize it with libvips (sharp): set width and/or height, fit mode (inside keeps aspect ratio within the box, cover crops to fill, contain letterboxes, fill stretches), output format (PNG, JPEG, WebP, AVIF) and quality. Honors EXIF rotation. Input up to 15 MB / 50 megapixels, output up to 4096px per side. Returns a short-lived download URL (valid 1 hour) with final dimensions and byte size; set includeBase64 for the bytes inline (up to 3 MB). Deterministic, no AI.
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": {
"url": "<url>"
},
"name": "image_resize"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fit | No | How to fit both dimensions (default inside = keep aspect ratio, no crop) | |
| url | Yes | Public URL of the source image (PNG, JPEG, WebP, AVIF, GIF, TIFF, SVG) | |
| width | No | Target width in pixels, 1-4096 (give width, height, or both) | |
| format | No | Output format (default: same family as the source, PNG otherwise) | |
| height | No | Target height in pixels, 1-4096 | |
| quality | No | JPEG/WebP/AVIF quality 1-100 (default 82) | |
| background | No | Hex color for contain padding / JPEG flattening, e.g. #ffffff (default white) | |
| includeBase64 | No | Also return the image as base64 in the response (default false; omitted if over 3 MB) | |
| withoutEnlargement | No | Never upscale a smaller source (default false) |