Skip to main content
Glama

upload_ad_image

Upload an image for Meta Ads creatives by providing a file or URL. Returns an image hash for use in ad creation and image details.

Instructions

Upload an image to use in Meta Ads creatives.

Args:
    account_id: Meta Ads account ID (format: act_XXXXXXXXX)
    access_token: Meta API access token (optional - will use cached token if not provided)
    file: Data URL or raw base64 string of the image (e.g., "data:image/png;base64,iVBORw0KG...")
    image_url: Direct URL to an image to fetch and upload
    name: Optional name for the image (default: filename)

Returns:
    JSON object with:
      - image_hash: Pass this to create_ad_creative when building the ad,
        or to get_image_by_hash to view the image later.
      - images: List of {hash, url, width, height, name}. The url is a
        Meta CDN link you can fetch directly to view the image — no need
        to call any other tool right after upload.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
account_idYes
access_tokenNo
fileNo
image_urlNo
nameNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations present, so description fully handles behavioral disclosure. Explains two methods for image input (file vs image_url), optional access_token, default name behavior, and details return object structure including image_hash and images list. No mention of destructive actions or limits, but behavior is well-covered.

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

Conciseness5/5

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

Description is concise with a one-line summary followed by clearly labeled Args and Returns sections. No extraneous information; every sentence contributes to understanding.

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

Completeness5/5

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

Given 5 parameters, no annotations, and presence of an output schema (which is compensated by the description's return section), the description is complete. It explains input, output, and ties to other tools (create_ad_creative, get_image_by_hash). No gaps.

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

Parameters5/5

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

Schema coverage is 0%, yet description adds full meaning for each parameter: account_id format 'act_XXXXXXXXX', file as data URL or base64, image_url as direct URL, access_token optional with fallback, name defaults to filename. This compensates fully for the schema's lack of descriptions.

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?

Clearly states 'Upload an image to use in Meta Ads creatives.' Identifies the specific resource (image) and action (upload), distinguishing it from retrieval tools like get_ad_image and creative-building tools like create_ad_creative.

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

Usage Guidelines4/5

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

Provides context on when to use (for ad creatives) and how output image_hash ties into create_ad_creative and get_image_by_hash. Lacks explicit 'when not to use' but implies the tool is for uploading, not for other operations.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pipeboard-co/meta-ads-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server