resize_image
Resize images to custom width, height, or longest edge. Preserve aspect ratio to fit within a box without distortion.
Instructions
Resize an image.
Give width, height, both, or max_edge (longest side, aspect preserved). With preserve_aspect and both dimensions, the image is fitted inside the box rather than distorted.
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": {
"input_path": "<input_path>",
"output_path": "<output_path>"
},
"name": "resize_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| width | No | ||
| height | No | ||
| backend | No | ||
| quality | No | ||
| max_edge | No | ||
| input_path | Yes | ||
| output_path | Yes | ||
| preserve_aspect | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |