convert_and_resize
Convert images to different formats and resize them simultaneously for web optimization or specific platform requirements.
Instructions
Convert an image to a new format and resize it in a single operation.
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_format": "<output_format>"
},
"name": "convert_and_resize"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input_path | Yes | Absolute path to the source image file | |
| output_format | Yes | Target format | |
| quality | No | JPEG/WebP quality (1-100, default 90) | |
| width | No | Target width in pixels | |
| height | No | Target height in pixels | |
| preset | No | Named size preset (overrides width/height) | |
| lock_aspect_ratio | No | Keep aspect ratio (default true) | |
| output_path | No | Where to save the output |