Skip to main content
Glama

Meta Ads (Facebook & Instagram)

meta_ads_media_write_upload_image

Upload images and videos to Meta Ads account. Actions: upload_image — upload an image. Returns the image hash you need for create_creative. upload_video — upload video from URL (Meta fetches it). Returns video_id. get_upload_command — get a curl command for uploading large local video files (keeps file out of AI context). upload_image accepts the file in four ways (use exactly one): image_url/file_url (public URL), upload_id (uploaded via the command this tool hands you), file_base64, or upload_code. Call upload_image with NO file to get a ready-made upload command for a file on the user's machine. Facebook CDN links (*.fbcdn.net) are signed, expiring and pinned to the browser that opened them — they do NOT work as image_url from the server; upload the file instead. For listing already-uploaded media use meta_ads_media.

[Flattened action: upload_image]

Bulk support: accepts upload_ids for batched execution.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleNo
accountNo
file_urlNo
file_nameNo
file_pathNo
image_urlNo
upload_idNo
video_urlNo
upload_idsNo
file_base64No
upload_codeNo
auth_accountNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • addedInput schema / properties / file_base64
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / file_name
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / file_url
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / upload_code
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / upload_id
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / upload_ids
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  2. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only provide basic safety flags, so the description carries the behavioral burden. It adds substantive behavior: returns the image hash, describes the four file-delivery mechanisms, explains expiring CDN URLs, supports bulk via upload_ids, and keeps local large files out of context by issuing a curl command. There is no contradiction with the annotations.

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 well-organized: headline, action bullets, input-mode explanation, warning, sibling pointer, and bulk note. It earns most of its sentences. It loses a point for including upload_video/get_upload_command action details that are not part of this flattened tool, which adds unnecessary noise and potential misrouting.

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?

Given the huge number of parameters, not required fields, and no output schema, the description reveals the main invocation paths and expected result. However, it's sparse about account selection semantics, file_name/file_path roles, auth_account, errors, and the precise full-output for batch mode, leaving an agent partial gaps for a high-complexity tool.

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

Parameters3/5

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

With zero schema description coverage, the description compensates for files-related parameters: image_url/file_url, upload_id, file_base64, upload_code, and upload_ids are all semantically explained. However, several parameters (account, title, file_name, file_path, auth_account) are left undocumented, and the video_url path is ambiguous because the flattened action is upload_image. The description helps but does not fully compensate for the 0% schema coverage across 12 parameters.

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

Purpose4/5

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

The core action is stated clearly: upload an image and get an image hash for create_creative. However, the opening line says 'Upload images and videos' and then lists multiple actions, which muddies the exact scope of this particular tool until the 'Flattened action: upload_image' note appears. That flattened note eventually disambiguates it from the sibling upload_video and get_upload_command tools.

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 explicitly explains the supported input modes, says to use exactly one, tells the user to call it with no file to get a local upload command, warns that fbcdn.net links won't work server-side, and directs users to the listing sibling. This is strong, actionable alternative/condition guidance.

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.