image_resize
Resize an image by width, height, or percentage while preserving aspect ratio when only one dimension is set; output format follows the output file extension.
Instructions
Resize an image by width, height, or percentage. Keeps the aspect ratio when only one dimension is given. Output format comes from the output extension.
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": "image_resize"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| width | No | ||
| height | No | ||
| overwrite | No | ||
| input_path | Yes | ||
| percentage | No | ||
| output_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| width | Yes | ||
| format | Yes | ||
| height | Yes | ||
| output_path | Yes | ||
| output_bytes | Yes | ||
| original_size | Yes |