batch_optimize
Optimize multiple images in one operation: resize, convert format, adjust quality, and save results to an output directory.
Instructions
Optimize multiple images at once
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": {
"inputs": "<inputs>",
"outputDir": "<outputDir>"
},
"name": "batch_optimize"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| width | No | Target width for all images | |
| format | No | Output format for all images | |
| height | No | Target height for all images | |
| inputs | Yes | Array of input image paths or URLs | |
| prefix | No | Prefix to add to output filenames | |
| suffix | No | Suffix to add to output filenames (before extension) | |
| quality | No | Quality (1-100) for lossy formats | |
| outputDir | Yes | Output directory for optimized images |