compress_universal
Compress single images or batch-process directories, convert formats, resize by dimensions, and return output paths, compression ratios, and space savings.
Instructions
压缩图片或批量处理目录。
支持单文件压缩、单文件多格式输出、格式转换和目录批量压缩。 返回统一的结构化结果,包含输出路径、压缩比例、节省空间和错误信息。
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>"
},
"name": "compress_universal"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| formats | No | ||
| quality | No | ||
| max_width | No | ||
| recursive | No | ||
| input_path | Yes | ||
| max_height | No | ||
| output_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||