Skip to content

listing_photos_edit

Arrange one listing's photos and videos: add a photo or video from a chat file, add a photo from a URL or uploaded asset, reserve an upload slot, reorder, remove, set alt text, or add, replace, or remove a video.

For agents: this page as Markdown.

Granted by
listings:write
Team permission
listing.edit — a role that can edit listings
Effect
Writes to the seller’s Tusella workspace only. Nothing is sent to Etsy or Pinterest.
Undo
By the inverse listing_photos_edit action.
Retry-safe
Repeat the same client_request_id with the same arguments.

Description

Arrange one listing's photos and videos: add a photo or video from a chat file, add a photo from a URL or uploaded asset, reserve an upload slot, reorder, remove, set alt text, or add, replace, or remove a video. Not destructive — a remove is recovered by re-adding the asset, not by field revert. Variation-photo associations move only through the variation authoring family (listing_variations_preview/apply/propose). Tusella obtains the file for an imported Etsy video before adding or replacing it. For a full same-shop listing copy, use listing_create with from_listing_id.

Parameters

Name Type Required Description
alt_text string no set_alt_text: the new alt text.
client_request_id string yes Stable replay identity for this call; repeat it to retry safely.
content_type "image/heic" | "image/heif" | "image/jpeg" | "image/png" | "image/tiff" | "image/webp" | "video/mp4" | "video/quicktime" no request_upload: the MIME type of the bytes you will PUT.
file object no Chat file: add accepts JPEG/PNG/WebP; add_video/set_video accept MP4/MOV. Tusella downloads the bytes; no client PUT is needed. Exactly one of file/image_url/media_asset_id for add, or file/media_asset_id for video. set_video also requires media_id of the video to replace.
filename string no request_upload: the original filename.
image_url string no add: a public http(s) image URL to fetch server-side (JPEG, PNG, or WebP). URLs resolving to private or internal addresses are rejected. Exactly one of file/image_url/media_asset_id.
listing_id string no UUID of the listing. External agents must supply it; an in-app turn may use its bound listing.
media_asset_id string no add: an image already uploaded via request_upload (exactly one of file/image_url/media_asset_id). add_video / set_video: the video asset to place; exactly one of file/media_asset_id.
media_id string no remove / set_alt_text: the photo to act on. set_video / remove_video (required): the membership_id of the video to replace or remove, from listing_read's photos part (video.videos).
media_ids array of string no reorder: the full active photo list, in the new order.
media_kind "image" | "video" no request_upload: image (default) or video. Video requires listing_id; PUT bytes before add_video/set_video.
op "add" | "request_upload" | "reorder" | "remove" | "set_alt_text" | "add_video" | "set_video" | "remove_video" yes add, request_upload, reorder, remove, set_alt_text, add_video (a new video, never a replacement; at most 2 per listing), set_video (replace the video media_id names), or remove_video (remove the video media_id names).
size_bytes integer no request_upload: the exact byte size of the media.
target "candidate" | "active" no add: candidate (default — positioned later) or active (straight into the live gallery).

Example

Arguments
{
  "client_request_id": "descriptor-example-1",
  "listing_id": "00000000-0000-0000-0000-000000000001",
  "op": "add",
  "file": {
    "download_url": "https://files.test/image.png",
    "file_id": "example-file",
    "mime_type": "image/png"
  },
  "target": "candidate"
}
Result
{
  "result": {
    "listing_id": "00000000-0000-0000-0000-000000000001",
    "media_id": "00000000-0000-0000-0000-000000000001",
    "applied": [
      "alt_text"
    ],
    "skipped": []
  }
}

Schemas

Exactly what the server declares to MCP clients. The input_schema is what the server validates arguments against.

Input schema· 125 lines of JSON
{
  "properties": {
    "alt_text": {
      "description": "set_alt_text: the new alt text.",
      "type": "string"
    },
    "client_request_id": {
      "description": "Stable replay identity for this call; repeat it to retry safely.",
      "type": "string"
    },
    "content_type": {
      "description": "request_upload: the MIME type of the bytes you will PUT.",
      "enum": [
        "image/heic",
        "image/heif",
        "image/jpeg",
        "image/png",
        "image/tiff",
        "image/webp",
        "video/mp4",
        "video/quicktime"
      ],
      "type": "string"
    },
    "file": {
      "additionalProperties": false,
      "description": "Chat file: add accepts JPEG/PNG/WebP; add_video/set_video accept MP4/MOV. Tusella downloads the bytes; no client PUT is needed. Exactly one of file/image_url/media_asset_id for add, or file/media_asset_id for video. set_video also requires media_id of the video to replace.",
      "properties": {
        "download_url": {
          "description": "Temporary public HTTPS download URL supplied by the client; refresh if expired.",
          "maxLength": 16384,
          "minLength": 1,
          "type": "string"
        },
        "file_id": {
          "description": "Stable client file identifier; retained as a digest for request replay.",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "file_name": {
          "description": "Optional advisory original name; not retained by Tusella.",
          "maxLength": 1024,
          "type": "string"
        },
        "mime_type": {
          "description": "Optional advisory MIME type; actual downloaded bytes are validated.",
          "maxLength": 255,
          "type": "string"
        }
      },
      "required": [
        "download_url",
        "file_id"
      ],
      "type": "object"
    },
    "filename": {
      "description": "request_upload: the original filename.",
      "type": "string"
    },
    "image_url": {
      "description": "add: a public http(s) image URL to fetch server-side (JPEG, PNG, or WebP). URLs resolving to private or internal addresses are rejected. Exactly one of file/image_url/media_asset_id.",
      "type": "string"
    },
    "listing_id": {
      "description": "UUID of the listing. External agents must supply it; an in-app turn may use its bound listing.",
      "type": "string"
    },
    "media_asset_id": {
      "description": "add: an image already uploaded via request_upload (exactly one of file/image_url/media_asset_id). add_video / set_video: the video asset to place; exactly one of file/media_asset_id.",
      "type": "string"
    },
    "media_id": {
      "description": "remove / set_alt_text: the photo to act on. set_video / remove_video (required): the membership_id of the video to replace or remove, from listing_read's photos part (video.videos).",
      "type": "string"
    },
    "media_ids": {
      "description": "reorder: the full active photo list, in the new order.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "media_kind": {
      "description": "request_upload: image (default) or video. Video requires listing_id; PUT bytes before add_video/set_video.",
      "enum": [
        "image",
        "video"
      ],
      "type": "string"
    },
    "op": {
      "description": "add, request_upload, reorder, remove, set_alt_text, add_video (a new video, never a replacement; at most 2 per listing), set_video (replace the video media_id names), or remove_video (remove the video media_id names).",
      "enum": [
        "add",
        "request_upload",
        "reorder",
        "remove",
        "set_alt_text",
        "add_video",
        "set_video",
        "remove_video"
      ],
      "type": "string"
    },
    "size_bytes": {
      "description": "request_upload: the exact byte size of the media.",
      "type": "integer"
    },
    "target": {
      "description": "add: candidate (default — positioned later) or active (straight into the live gallery).",
      "enum": [
        "candidate",
        "active"
      ],
      "type": "string"
    }
  },
  "required": [
    "client_request_id",
    "op"
  ],
  "type": "object"
}
Output schema· 340 lines of JSON
{
  "properties": {
    "action_result": {
      "type": "object"
    },
    "applied": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "change": {
      "additionalProperties": false,
      "properties": {
        "media_ids": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "op": {
          "type": "string"
        },
        "previous_ranks": {
          "additionalProperties": {
            "type": [
              "integer",
              "null"
            ]
          },
          "type": "object"
        }
      },
      "required": [
        "op",
        "media_ids",
        "previous_ranks"
      ],
      "type": "object"
    },
    "change_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "completed_at": {
      "format": "date-time",
      "type": "string"
    },
    "expires_at": {
      "type": "string"
    },
    "field_change_ids": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "field_changes": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "after": {},
          "before": {},
          "display": {
            "additionalProperties": false,
            "properties": {
              "after": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "before": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "before",
              "after"
            ],
            "type": "object"
          },
          "field": {
            "type": "string"
          },
          "values_omitted": {
            "type": "boolean"
          }
        },
        "required": [
          "field",
          "before",
          "after",
          "display"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "gallery": {
      "additionalProperties": false,
      "properties": {
        "only_on_etsy_count": {
          "minimum": 0,
          "type": "integer"
        },
        "revision": {
          "type": "string"
        },
        "rows": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "is_cover": {
                "type": "boolean"
              },
              "media_id": {
                "type": "string"
              },
              "preview": {
                "additionalProperties": false,
                "properties": {
                  "expires_at": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "url": {
                    "type": "string"
                  }
                },
                "required": [
                  "url",
                  "expires_at"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "rank": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "state": {
                "enum": [
                  "active",
                  "only_on_etsy"
                ],
                "type": "string"
              }
            },
            "required": [
              "media_id",
              "rank",
              "state",
              "is_cover",
              "preview"
            ],
            "type": "object"
          },
          "maxItems": 6,
          "type": "array"
        },
        "total": {
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "rows",
        "total",
        "only_on_etsy_count",
        "revision"
      ],
      "type": "object"
    },
    "listing": {
      "additionalProperties": false,
      "properties": {
        "changes_vs_etsy": {
          "type": [
            "string",
            "null"
          ]
        },
        "price_max": {
          "additionalProperties": false,
          "properties": {
            "amount": {
              "type": "string"
            },
            "currency_code": {
              "type": "string"
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "price_min": {
          "additionalProperties": false,
          "properties": {
            "amount": {
              "type": "string"
            },
            "currency_code": {
              "type": "string"
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "price_varies": {
          "type": "boolean"
        },
        "status": {
          "type": "string"
        },
        "thumbnail": {
          "additionalProperties": false,
          "properties": {
            "expires_at": {
              "type": [
                "string",
                "null"
              ]
            },
            "url": {
              "type": "string"
            }
          },
          "required": [
            "url",
            "expires_at"
          ],
          "type": [
            "object",
            "null"
          ]
        },
        "title": {
          "type": "string"
        }
      },
      "type": [
        "object",
        "null"
      ]
    },
    "listing_id": {
      "type": "string"
    },
    "media": {
      "additionalProperties": false,
      "properties": {
        "media_id": {
          "type": "string"
        },
        "preview": {
          "additionalProperties": false,
          "properties": {
            "expires_at": {
              "type": [
                "string",
                "null"
              ]
            },
            "url": {
              "type": "string"
            }
          },
          "required": [
            "url",
            "expires_at"
          ],
          "type": [
            "object",
            "null"
          ]
        }
      },
      "required": [
        "media_id",
        "preview"
      ],
      "type": [
        "object",
        "null"
      ]
    },
    "media_asset_id": {
      "type": "string"
    },
    "media_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "skipped": {
      "items": {
        "properties": {
          "field": {
            "type": "string"
          },
          "media_id": {
            "type": "string"
          },
          "skipped_reason": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "type": "array"
    },
    "upload_url": {
      "type": "string"
    }
  },
  "required": [],
  "type": "object",
  "x-result-size-budget": {
    "description": "One write receipt.",
    "max_bytes": 16384,
    "strategy": "bounded-result"
  }
}