Skip to main content
Glama
hashcott

Meta Ads MCP Server

by hashcott

Get Meta Ad Previews

meta_ads_get_ad_previews
Read-onlyIdempotent

Generate preview links or embed HTML for a Meta ad across multiple placements like Facebook feed, Instagram, and Stories. See how your ad looks before or after publishing.

Instructions

Generate preview links or embed HTML for a Meta ad in various ad formats and placements.

Allows you to see how an ad looks across different placements (Facebook feed, Instagram, Stories, etc.) before or after publishing.

Args:

  • ad_id (string): Ad ID to preview, e.g., '23843211234567'

  • ad_format (string): Preview format. Options: DESKTOP_FEED_STANDARD, MOBILE_FEED_STANDARD, MOBILE_FEED_BASIC, MOBILE_INTERSTITIAL, MOBILE_BANNER, MOBILE_MEDIUM_RECTANGLE, MOBILE_FULLWIDTH, RIGHT_COLUMN_STANDARD, INSTAGRAM_STANDARD, INSTAGRAM_STORY, AUDIENCE_NETWORK_OUTSTREAM_VIDEO, AUDIENCE_NETWORK_INSTREAM_VIDEO, FACEBOOK_STORY_MOBILE, MESSENGER_MOBILE_INBOX_MEDIA, SUGGESTED_VIDEO_MOBILE, WATCH_FEED_MOBILE, FACEBOOK_REELS_MOBILE, INSTAGRAM_REELS

  • locale (string): Locale for the preview, e.g., 'en_US'

  • start_date (string): Preview start date for scheduled ads (UNIX timestamp)

  • end_date (string): Preview end date for scheduled ads (UNIX timestamp)

Returns: Object with data array. Each item contains:

  • body (string): HTML iframe embed code for the preview

  • encoded_creative_id (string): Encoded creative ID

Examples:

  • Use when: "Show me how ad 23843211234567 looks on Instagram"

  • Use when: "Preview this ad in desktop feed format"

  • Use when: "Generate previews for all placements of this ad"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ad_idYesAd ID to preview, e.g., '23843211234567'
ad_formatNoPreview format/placement. Options: DESKTOP_FEED_STANDARD, MOBILE_FEED_STANDARD, INSTAGRAM_STANDARD, INSTAGRAM_STORY, FACEBOOK_STORY_MOBILE, FACEBOOK_REELS_MOBILE, INSTAGRAM_REELS, RIGHT_COLUMN_STANDARD, MESSENGER_MOBILE_INBOX_MEDIA, etc.
localeNoLocale for the preview, e.g., 'en_US', 'vi_VN'
start_dateNoPreview start date as UNIX timestamp (for scheduled ads)
end_dateNoPreview end date as UNIX timestamp (for scheduled ads)

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