batch
Apply resize, convert, compress, strip metadata, rotate/flip, or crop to many image files at once, preview changes with a dry run, and get per-file results.
Instructions
Apply one operation to many files and get a per-file result table.
operation: resize | convert | compress | strip_metadata | rotate_flip | crop. pattern: a file, or a glob such as 'D:/photos/.jpg' or 'D:/photos/**/.png'. params: that operation's own options, e.g. {'width': 1600}, {'format': 'webp'}, {'target_size': '300KB'}. dry_run defaults to TRUE: it lists what would be written (and what would fail, e.g. existing outputs) without touching anything; call again with dry_run=false to apply. Outputs land next to each input as name.resized.jpg, or in output_dir keeping the file names. Files that look like earlier outputs of the same operation are skipped. One bad file does not stop the run: failures are listed in the table (the call only errors if every file failed). Never overwrites unless overwrite=true.
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": {
"operation": "<operation>",
"pattern": "<pattern>"
},
"name": "batch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | No | ||
| dry_run | No | ||
| pattern | Yes | ||
| max_files | No | ||
| operation | Yes | ||
| overwrite | No | ||
| output_dir | No |