Skip to main content
Glama
atmosphere-ai

AdvisorPPC X Ads MCP Server

Upload media

x_ads_upload_media

Upload image or video for X ads via URL or base64. Handles large files with chunked upload and returns media_key for use in campaigns.

Instructions

Upload an image or video via media_url or inline base64 (media.data). Images use simple upload; video and files >5MB use v2 chunked INIT/APPEND/FINALIZE and poll until processed. Ads videos use media_category amplify_video. Returns media_key for cards/tweets. Provide exactly one source. If the intended creative failed to upload or process, STOP. Do not promote a still, a source image, or a pre-existing library asset.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNo
mediaNo
for_adsNo
media_urlNo
account_idYesAds API account id from x_ads_list_accounts, e.g. 18ce55v2od2

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only indicate readOnlyHint=false and openWorldHint=true. The description goes beyond this by disclosing important behaviors: the difference between simple upload for images vs. chunked upload for videos/files >5MB, the need to poll until processed, and the requirement to provide exactly one source. It also warns about failure and prohibited use cases, which is valuable behavioral context not available in annotations. The only minor gap is lack of detail on return format or error handling, but overall it is strong.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense but comprehensive, covering key aspects in a few sentences. It front-loads the main purpose and upload methods, then provides crucial constraints and warnings. While it could be trimmed (e.g., 'Provide exactly one source' is repeated implicitly), the structure is logical and each sentence adds valuable information, earning a high but not perfect score.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is a multi-step, stateful operation (chunked upload, polling) that requires behavioral disclosure. Given the low schema description coverage and no output schema, the description covers the essential workflow, parameter constraints, and common failure modes. It lacks specifics on the response structure and exact polling details, but overall it provides sufficient context for an agent to use the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is low (20%), but the description compensates by explaining the two main parameter families: media_url and media.data (base64). It clarifies that only one source should be provided and describes the media_category for ads videos, which is not fully clear in the schema. The description adds meaning to parameters like media and media_url beyond the bare schema definitions, though it doesn't detail every property (e.g., file_name, mime_type, encoding).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies the tool as 'upload an image or video' and specifies the two supported input methods (media_url or inline base64). It distinguishes itself from sibling tools like x_ads_get_media (which retrieves media) and the various create/update tools by focusing solely on the upload action. The verb 'upload' is specific to this resource and the scope is well-defined.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool: it is for uploading media to be used in ads, with specific handling for video (using v2 chunked upload) and ads videos (media_category amplify_video). It also gives clear exclusion criteria: 'Do not promote a still, a source image, or a pre-existing library asset' and instructs to STOP if the upload fails, preventing misuse. This is well-differentiated from alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.