Upload photo
upload_photoPuts a photo you made into the store's Files, for a section's photo setting: a cut-out a section asks for, or a view you drew. Two steps. First send filename, mime_type and file_size: you get post_to and form_fields. POST a multipart form there with every form field, then the file last in a field named file (the curl example shows it). The file goes straight to Shopify. Then call again with upload_id: you get photo, a shopify://shop_images/ value for the photo setting. In ChatGPT, send an image from the chat as file instead. PNG, WebP or JPEG, up to 10 MB. Cut-outs need PNG or WebP with a transparent background.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "upload_photo"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| alt | No | What the photo shows, for shoppers who can't see it. At most 200 characters. | |
| file | No | ChatGPT only: an image from the chat, in place of steps 1 and 2. | |
| filename | No | Step 1: a name for the file, like linen-shirt-side.png. | |
| file_size | No | Step 1: the file's size in bytes, at most 10485760. | |
| mime_type | No | Step 1: the file's type. | |
| upload_id | No | Step 2: upload_id from step 1, after you posted the file. |