Skip to content

x_ads_upload_media

Upload an image, GIF or MP4 to X. A write tool that previews before it changes anything, one of 56 X Ads tools on the Get MCP Ads MCP gateway.

View as Markdown

Upload an image, GIF or MP4 to X. Preview has size and SHA-256 only. X API credits may be charged. Images use one request; video/GIF use initialize, 4 MiB appends and finalize, no retries. Wait for get_media_upload_status ready, then register media_key with create_media_library_item. Creates no ad.

Source
X Ads
Kind
Write
Discovery
Reachable through search_tools and run_write_tool
Account parameter
account_id
Endpoint
https://mcp.getmcpads.com/x-ads/mcp

Parameters

Parameters
NameTypeRequiredNotes
account_idstringRequiredX Ads account selected in Sources. Register the resulting media in this account's media library.
media_base64stringRequiredFile bytes as base64, without a data URL prefix. Images 5 MB, GIF 15 MB, MP4 16 MiB. No URL fetching.
media_typestringRequiredMIME type matching the actual uploaded file bytes. One of: image/png, image/jpeg, image/gif, video/mp4.
confirmbooleanOptionalFalse previews only; true uploads after human confirmation, potentially charging X developer API credits. Default: false.

Calling it

json · Through run_write_tool, since it is not announced
{
  "name": "run_write_tool",
  "arguments": {
    "name": "x_ads_upload_media",
    "args": {
      "account_id": "<string>",
      "media_base64": "<string>",
      "media_type": "image/png"
    }
  }
}

Manage your ads from your AI assistant

Start for free

Free with 1 ad account, no card. Pro is free for 7 days.

Esc

Type to search