Add listing photo
add_listing_photoAttach one JPEG, PNG, WebP, or HEIC photo to the seller's draft or active listing. Requires scope listings:write. Pass the photo the person attached as the photo file parameter when your platform supports file inputs. Only send dataBase64 for a small file you can encode exactly; never type out a large photo. If you cannot pass the file, call create_photo_upload_link instead and give the person the link. Buyers see exactly the uploaded bytes, so do not resize, recompress, crop, or screenshot. Photos must be at least 1000 pixels on the long side and 600 on the short side; smaller ones are refused with photo_too_small, and then ask the person for the original photo. Maximum 8 MB and 5 photos. After the first photo, offer to publish with update_listing.
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": {
"listingId": "<listingId>"
},
"name": "add_listing_photo"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| photo | No | The image file the person attached in this conversation. Preferred over dataBase64. | |
| listingId | Yes | ||
| dataBase64 | No | Standard base64 of the image bytes. Only for small files; prefer photo or create_photo_upload_link. | |
| contentType | No | With dataBase64: image/jpeg, image/png, image/webp, image/heic, or image/heif. |