upload_image_asset
Drafts PNG/JPEG image uploads for Microsoft Ads media libraries and Performance Max asset groups, returning a media ID on apply. Enforces file-size and pixel limits before confirmation.
Instructions
Draft an image upload to the account media library (for image extensions / PMax asset groups). Returns media id on apply. Valid PNG/JPEG only, at most 5 MiB and 20 million pixels (local safety limits). The file must remain byte-identical between preview and apply; otherwise create a new draft.
media_type is the image's aspect ratio, one of:
Image1x1: square (e.g. 1200x1200)
Image191x100: 1.91:1 landscape (e.g. 1200x628)
GenericImage
Image4x1
Live-verified 2026-07-30, after fixing two live faults (MediaType is an aspect-ratio label; the AddMedia response comes back unwrapped — both noted above). AddMedia also dedupes byte-identical images: re-uploading returns the existing media id.
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": {
"file_path": "<file_path>",
"media_type": "<media_type>"
},
"name": "upload_image_asset"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | ||
| media_type | Yes |