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)
Behavior4/5

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

Annotations already provide readOnlyHint=true, destructiveHint=false, idempotentHint=true. The description adds context that the tool returns an object with an HTML embed body and encoded creative ID, and mentions it can be used before or after publishing. No contradictions with 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 well-structured with separate sections for Args, Returns, and examples. It is somewhat lengthy due to the enum listing but remains readable and front-loaded with the main purpose. A slight trim could improve conciseness.

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 tool has 5 parameters, no output schema, but detailed annotations, the description covers the purpose, all parameters, return format, and provides usage examples. It lacks details on constraints like ad state or error conditions, but overall it is complete enough for effective use.

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 100% schema description coverage, the baseline is 3. The description repeats the parameter descriptions largely verbatim from the schema (e.g., ad_format enum list, locale format) without adding significant new meaning or usage nuances beyond the schema itself.

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 clearly states the tool generates preview links or embed HTML for a Meta ad across various formats and placements. It uses specific verbs (generate, preview) and distinguishes it from sibling tools that fetch data or perform other operations.

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 includes explicit usage examples (e.g., 'Use when: Show me how ad 23843211234567 looks on Instagram') that indicate when to use the tool. However, it does not provide explicit when-not-to-use guidance or mention alternatives, so it falls short of a 5.

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

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