Skip to content
Get MCP AdsGet MCP Ads, home

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_tools and run_tool
Account parameter
account_id
Endpoint
https://mcp.getmcpads.com/x-ads/mcp

ParametersLink to this section

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. Maximum 4 MB per file, including MP4 clips. 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 itLink to this section

jsonThrough run_tool, since it is not announced
{
  "name": "run_tool",
  "arguments": {
    "name": "x_ads_upload_media",
    "args": {
      "account_id": "<string>",
      "media_base64": "<string>",
      "media_type": "image/png"
    }
  }
}
Esc

Type to search