image_resize
Batch resize images from a file or folder into a chosen output directory using long-side, exact width/height, fixed-width, or percentage scaling.
Instructions
批量调整图片尺寸。input_path 可为单文件或目录;输出到 output_dir。四选一:long_side(按长边等比缩,只缩不放)、width+height(精确)、width(定宽等比)、percent(百分比,如 50 表示缩到一半)。返回处理张数与输出目录。
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_dir": "<output_dir>"
},
"name": "image_resize"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| width | No | ||
| height | No | ||
| percent | No | ||
| long_side | No | ||
| input_path | Yes | ||
| output_dir | Yes |