Skip to main content
Glama
hashcott

Meta Ads MCP Server

by hashcott

Compute Meta Ad Image Crops

meta_ads_compute_image_crops
Read-onlyIdempotent

Compute image crop coordinates for ad creative formats. Returns the largest centered region matching each requested aspect ratio, ready for ad creation.

Instructions

Compute image_crops coordinates for a source image. For each requested key, returns the largest centered region that fits the source while matching that key's aspect ratio (equivalent to Meta's "Original" crop — no content cut beyond the ratio).

Valid keys (Meta accepts only these 6): 100x100 — 1:1 square (Feed, Marketplace) 100x72 — ~1.39:1 horizontal (Marketplace) 400x500 — 4:5 portrait (Feed mobile, Stories fallback) 400x150 — ~2.67:1 banner (Audience Network) 600x360 — ~1.67:1 horizontal (Right column) 90x160 — 9:16 portrait (Stories)

Pass the returned image_crops dict to meta_ads_create_ad_creative.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
image_widthYes
image_heightYes
crop_keysNo

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

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