resize
Adjust image dimensions by width, height, or percent; keep aspect ratio by default, or fit, fill, or stretch to exact dimensions.
Instructions
Resize an image. Give width and/or height (pixels) or percent.
One side only: the other follows the aspect ratio. Both sides, by mode: fit (default) = largest size inside the box, keeps aspect ratio; fill = cover the box and center-crop the overflow (thumbnails, avatars); exact = stretch to exactly width x height.
Never enlarges unless allow_upscale=true (a too-large request keeps the original size and says so). Output goes to photo.resized.jpg next to the input unless output= is given (its extension picks the format, so output='x.webp' resizes and converts). Animated GIF/WebP keep every frame. quality (1-100) applies to JPEG/WebP/AVIF output. keep_metadata=false drops EXIF (including GPS). Existing files are never replaced unless overwrite=true. allow_huge=true lifts the decompression-bomb limit (default 100 MP).
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": {
"path": "<path>"
},
"name": "resize"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | fit | |
| path | Yes | ||
| width | No | ||
| height | No | ||
| output | No | ||
| percent | No | ||
| preview | No | ||
| quality | No | ||
| resample | No | lanczos | |
| overwrite | No | ||
| allow_huge | No | ||
| allow_upscale | No | ||
| keep_metadata | No |