Skip to main content
Glama
pralayasimha23

meta-ads-mcp

upload_ad_image

Upload an image to Meta Ads to obtain its hash for use in ad creatives. Supports base64 file data or an image URL.

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 response with image details including hash for creative creation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNo
nameNo
image_urlNo
account_idYes
access_tokenNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses input formats (data URL/base64/file URL), optional token behavior with caching fallback, and the return format including the hash for creative creation. This goes beyond basic visibility, though it doesn't mention rate limits or conflicts when both file and image_url are provided.

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?

The description is concise and well-structured, using a clear Args/Returns format. The example data URL is valuable without being verbose. No wasted words.

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

Completeness3/5

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

The description covers all parameters and the return's purpose, and an output schema exists. However, it doesn't specify the relationship between 'file' and 'image_url' (whether at least one is required, or what happens if both are provided). This is a notable gap for a tool whose sole purpose is uploading an image.

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%, so the description must compensate. It does so thoroughly: account_id format (act_XXXXXXXXX), access_token caching behavior, file data URL/base64 formats with example, image_url semantics, and name default. Each parameter gets meaningful guidance beyond the schema's bare titles.

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 gives a specific verb (upload), resource (image), and purpose (use in Meta Ads creatives), distinguishing it from read-oriented sibling tools like get_ad_image and get_ad_video.

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?

The description implies usage by noting the return includes 'hash for creative creation,' situating it in the creative-creation workflow. However, it does not explicitly name alternatives or state when not to use it, so usage guidance is clear but not fully explicit.

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/pralayasimha23/meta-ads-mcp'

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