prepare_for_web
Resize local images without enlargement, strip EXIF metadata, and convert them to WebP, AVIF, JPEG, or PNG to reduce file size for web publishing.
Instructions
Resize (without enlargement), strip EXIF metadata, and convert a local image to WebP, AVIF, JPEG, or PNG with file size savings metrics.
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": {
"imagePath": "<imagePath>"
},
"name": "prepare_for_web"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | Target web format. | webp |
| quality | No | Encoder quality (1-100). | |
| maxWidth | No | Maximum output width in pixels. | |
| imagePath | Yes | Path to the local source image. | |
| maxHeight | No | Maximum output height in pixels. | |
| overwrite | No | Allow overwriting an existing output file. | |
| outputPath | No | Optional output path (defaults to <name>_web.<ext>). | |
| keepMetadata | No | Keep EXIF/ICC metadata instead of stripping. |