compress_image
Reduce image file size by compressing JPG, PNG, or WebP images. Choose compression level to control quality versus size.
Instructions
Compress an image via PDF4me CompressImage (/api/v2/CompressImage). image_file_path, image_type (JPG, PNG, WebP), compression_level (Max, Medium, Low); optional doc_name, output_dir, output_file_name. Uses async 202 polling when applicable.
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": {
"image_file_path": "<image_file_path>"
},
"name": "compress_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doc_name | No | ||
| image_type | No | JPG | |
| output_dir | No | ||
| image_file_path | Yes | ||
| output_file_name | No | ||
| compression_level | No | Medium |