x_ ads_ upload_ media
Upload an image, GIF or MP4 clip to X. A write tool that previews before it changes anything, one of 44 X Ads tools on the Get MCP Ads MCP gateway.
Upload an image, GIF or MP4 clip to X. Preview includes size and SHA-256 only. X API credits may be charged. Images use one request; video/GIF use initialize, append and finalize without retries. Check processing before registering the returned media_key with create_media_library_item. Does not create or activate an ad.
- Source
- X Ads
- Kind
- Write
- Discovery
- Reachable through
search_toolsandrun_tool - Account parameter
account_id- Endpoint
- https:/
/ mcp. getmcpads. com/ x-ads/ mcp
ParametersLink to this section
| Name | Type | Required | Notes |
|---|---|---|---|
account_id | string | Required | X Ads account selected in Sources. Register the resulting media in this account's media library. |
media_base64 | string | Required | File bytes as base64, without a data URL prefix. Maximum 4 MB per file, including MP4 clips. No URL fetching. |
media_type | string | Required | MIME type matching the actual uploaded file bytes. One of: image/png, image/jpeg, image/gif, video/mp4. |
confirm | boolean | Optional | False previews only; true uploads after human confirmation, potentially charging X developer API credits. Default: false. |
Calling itLink to this section
{
"name": "run_tool",
"arguments": {
"name": "x_ads_upload_media",
"args": {
"account_id": "<string>",
"media_base64": "<string>",
"media_type": "image/png"
}
}
}