Skip to main content
Glama

Upload ad image or video

meta_upload_media

Upload to the ad account from an AdChat file_id, a base64 file (image only), or a public HTTPS image_url or video_url (video up to 20 MB; local or larger files: start_upload, then pass the file_id). AdChat saves the source first and uploads exactly those bytes. A video_id is usable once meta_media video_status says ready. Changes the ad account: tell the user exactly what will change and call only after their Yes. If the result lists rule reasons, nothing changed: show them, ask again, and only after a new Yes retry with acknowledge_rules: true.

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": {
      "type": "<type>",
      "account_id": "<account_id>"
    },
    "name": "meta_upload_media"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileNoOnly image
nameNo
typeYes
titleNoOnly video
file_idNo
image_urlNoOnly image
video_urlNoOnly video
account_idYese.g. act_1234567890
descriptionNoOnly video
acknowledge_rulesNoOnly on a retry after the user's Yes to rule reasons; never on a first call.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare write/open-world/non-idempotent/non-destructive; the description goes well beyond them by requiring explicit user confirmation before calling, explaining that the source is saved and exactly those bytes uploaded, and describing the failure mode where rule reasons mean nothing changed and a retry requires acknowledge_rules after a new Yes. That is precisely the behavioral context an agent cannot get from structured fields.

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 critical source-routing sentence is front-loaded and the confirmation/retry rules follow in logical order; nearly every clause carries operational weight. It is a dense wall of text in one paragraph, and the 20 MB figure sits mid-sentence rather than being surfaced as a constraint, which slightly hurts scanability.

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?

With ten parameters, no output schema, and no annotation detail, the description covers the failure path and the readiness gate well. The remaining gap is the success shape: it says a video_id becomes usable when video_status is ready but never says what the successful response contains (media id, video id, pending state), which an agent needs since no output schema exists.

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 coverage is 70%, and the description adds meaning on top: it clarifies which sources are image-only versus video, states the 20 MB video cap (schema shows only a 28 MB maxLength on 'file'), and explains the acknowledge_rules retry protocol beyond the schema's terse note. It does not mention the video-only 'title' and 'description' parameters, leaving those entirely to the schema.

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?

States a specific verb and resource ('Upload to the ad account') and enumerates the exact accepted sources: AdChat file_id, base64 image, public HTTPS image_url or video_url. It also distinguishes itself from the sibling 'start_upload' by reserving that path for local or larger files, so an agent can route without opening either schema.

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?

Gives explicit routing rules between alternatives: use this tool for file_id / base64 / public URL, but use start_upload first when the file is local or above the size cap and then pass the file_id. It also states the prerequisite for consuming a video_id (video_status must say ready) and the retry gate, leaving little to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.