Resize an image
resize_imageResize an image by pixels or percent. Fit is contain, cover, or stretch. Send base64 or a public URL. Private addresses are refused and the decoded file is capped at 10 MB. Returns the image as base64.
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": {
"file": "<file>"
},
"name": "resize_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fit | No | contain | |
| file | Yes | The image. Provide url or data. | |
| mode | No | pixels | |
| width | No | ||
| height | No | ||
| percent | No | ||
| lockAspect | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Resized image as base64. | |
| mime | Yes | ||
| bytes | Yes | ||
| width | Yes | ||
| height | Yes | ||
| filename | Yes | ||
| extension | Yes |