Resize an image
image_resizeCall this tool to write a resized copy. fit inside keeps aspect; cover fills and crops; exact stretches. One of width/height alone keeps aspect. Input untouched. Free: sources up to 4 MP.
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": {
"path": "<path>",
"out_path": "<out_path>"
},
"name": "image_resize"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fit | No | inside = fit within the box, cover = fill and crop, exact = stretch | inside |
| path | Yes | Name of an image uploaded with image_upload, or one this server wrote earlier | |
| width | No | Target width in pixels | |
| height | No | Target height in pixels | |
| out_path | Yes | Name for the file to write; it comes back as a download link valid for one hour. The extension decides the output format; without a known one the input's format is kept | |
| overwrite | No | Replace out_path if it already exists. Default false. Never allows an output to be one of the inputs |