Content is loading…
Resize any image URL to your chosen dimensions — PNG/JPEG/WebP/AVIF.
image_resize#image resize#image processing#sharp#thumbnail#image optimizationDownload an image from a url and resize it using width, height, and fit parameters. Returns a temporary URL for the processed image in the specified format and quality. At least one dimension is required; the output expires after 24 hours.
| Name | Type | Required | Description |
|---|---|---|---|
url | string | required | Source image URL to resize (http or https). Max 10 MB. |
width | number | optional | Target width in pixels (1-8000). Either width or height must be provided. |
height | number | optional | Target height in pixels (1-8000). Either width or height must be provided. |
fit | enum ("cover" | "contain" | "fill" | "inside" | "outside") | optional | How to fit the image into the target dimensions. "inside" preserves aspect ratio within the box (default). "cover" fills the box and crops. "contain" letterboxes. "fill" stretches. "outside" preserves aspect ratio but ensures the image covers the box. |
format | enum ("png" | "jpeg" | "webp" | "avif") | optional | Output image format. Default "webp". |
quality | number | optional | Quality 1-100 for lossy formats (jpeg/webp/avif). Default 85. Ignored for png. |
{
"url": "https://example.com/img.jpg",
"width": 800,
"format": "webp"
}curl -X POST https://toolsy.my/api/mcp \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "image_resize",
"arguments": {
"url": "https://example.com/img.jpg",
"width": 800,
"format": "webp"
}
}
}'Generate a free API key or set up an OAuth connector for Claude.ai.