Upload an image
upload_imagePut an image into the merchant's image library, re-hosted on the catalog's own storage with resized variants, and get back the URL to use in edit_catalog (addBlock with an image, editBlock with url, editProduct with main_image). Give either url — a publicly reachable image, fetched and copied — or base64 with its contentType. JPEG, PNG, WebP or GIF, up to 20 MB. The same picture uploaded twice lands once.
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": {
"name": "<name>"
},
"name": "upload_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | A public image URL to copy | |
| name | Yes | A name for the library, e.g. "Spring cover" | |
| base64 | No | The image bytes, base64 (no data: prefix) | |
| contentType | No | With base64 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The URL edit_catalog places the image with | |
| name | Yes | ||
| width | Yes | ||
| fileId | Yes | ||
| height | Yes | ||
| variants | No | Resized copies, by width |