Skip to main content
Glama

Get Meta Ad Library Ads

get_meta_ads
Read-only

Use this when you have a Meta Platform ID and want to see what ads a brand is currently running. Returns ad content, dates, and targeting info; set include_reach=true for reach and age/gender/country delivery demographics. ALWAYS pass platform_ids as a list when researching multiple brands — e.g. platform_ids=['123','456','789'] — never call this tool multiple times in parallel for different IDs (parallel calls are rate-limited server-side and will fail). Look up media_url in the media_urls dict by ad_id before calling analyze_ad_image/analyze_ad_video. If may_be_inactive: true, the page likely paused advertising — try other candidate IDs. Note: headline may be null on video ads; use body + media_type instead. Set min_duration_days: 7 to return only ads active for 7+ days. Set active_only: true to return only currently running ads. Set status='inactive' to see retired creatives. Optionally sort with sort_by='total_impressions' (highest-spend first) or 'relevancy_monthly_grouped'. If comparing multiple brands or surfacing patterns across ads, follow up with get_competitive_brief. SHOWING THE ADS — REQUIRED: don't just summarise in text — you MUST call show_ad_carousel at least once this turn so the user SEES the creatives as visual proof, not only reads about them. Interleave it WITH your analysis: each time you make a point about specific ads, call show_ad_carousel right after that sentence with only the ads that evidence THAT point (pass each as {ad_id, page_id} copied from this tool's output; the server fills in copy/media/cards). Make as many carousels as you have distinct points, strictly point → its carousel → next point → its carousel; NEVER stack carousels back-to-back or dump all points as a list after the carousels. Be generous: across your carousels, show MOST of the ads this tool returned (up to 20 per carousel) — skip only ads that are irrelevant or near-duplicates. Never render just 2-3 ads when a dozen were found; if discussed points don't cover all the ads, close with a broader carousel of the rest. Don't finish a turn that discusses specific ads without having rendered at least one. You may mix Meta {ad_id, page_id}, Google {ad_url}, LinkedIn {linkedin_id}, and TikTok {tiktok_id} refs in a single carousel when a point spans platforms. The only time to skip it entirely is when this tool returned zero ads.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
trimNoTrue (default) returns essential fields; False adds full metadata including targeting.
limitNoMax ads per platform ID (default 100, min 25, max 1000), fetched in pages at 1 credit each. Low values can miss active ads.
cursorNoContinuation token from a previous response. Present when more ads exist beyond what was scanned. Single platform ID only; offer to continue before spending extra credits.
statusNo"active" (default), "inactive" or "all".
contextNoOne plain sentence, 8-20 words, starting with a verb, stating what the user is trying to accomplish in this conversation. Name the brand, competitor, industry, or topic involved. Reuse the exact same sentence on every tool call in this conversation. Never include people's names, emails, phone numbers, credentials, or internal company details. Never describe this tool or why it was chosen. Example: 'Compare Notion and Coda Meta ads to find hooks for a productivity app launch.'
countryNoTwo-letter country code to filter by targeting, e.g. "US". Default: all countries.
sort_byNo"total_impressions" (highest spend first) or "relevancy_monthly_grouped".
end_dateNoFilter by impressions end date, YYYY-MM-DD.
languageNoTwo-letter language code, e.g. "EN" or "FR".
media_typeNo"all" (default), "image" (static creatives, including image carousels) or "video" (video only).
start_dateNoFilter by impressions start date, YYYY-MM-DD.
active_onlyNoTrue returns only currently running ads.
platform_idsYesMeta Platform ID or list of IDs from get_meta_platform_id. For several brands pass one list (a single batched call); parallel single-ID calls are throttled.
include_reachNoTrue adds each ad's EU/UK reach and age/gender/country breakdowns (one upstream call per ad). Suited to reach, audience and performance questions.
conversation_idNoEcho the conversation_id from the server's previous response. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it.
min_duration_daysNoOnly ads that have run for at least this many days.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
_mcp_instructionsNoServer-issued metadata for this conversation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed14 schema fields changed
    • addedInput schema / properties / active_only / description
      Added value: +"True returns only currently running ads."
    • addedInput schema / properties / country / description
      Added value: +"Two-letter country code to filter by targeting, e.g. \"US\". Default: all countries."
    • addedInput schema / properties / cursor / description
      Added value: +"Continuation token from a previous response. Present when more ads exist beyond what was scanned. Single platform ID only; offer to continue before spending extra credits."
    • addedInput schema / properties / end_date / description
      Added value: +"Filter by impressions end date, YYYY-MM-DD."
    • addedInput schema / properties / include_reach / description
      Added value: +"True adds each ad's EU/UK reach and age/gender/country breakdowns (one upstream call per ad). Suited to reach, audience and performance questions."
    • addedInput schema / properties / language / description
      Added value: +"Two-letter language code, e.g. \"EN\" or \"FR\"."
    • addedInput schema / properties / limit / description
      Added value: +"Max ads per platform ID (default 100, min 25, max 1000), fetched in pages at 1 credit each. Low values can miss active ads."
    • addedInput schema / properties / media_type / description
      Added value: +"\"all\" (default), \"image\" (static creatives, including image carousels) or \"video\" (video only)."
    • addedInput schema / properties / min_duration_days / description
      Added value: +"Only ads that have run for at least this many days."
    • addedInput schema / properties / platform_ids / description
      Added value: +"Meta Platform ID or list of IDs from get_meta_platform_id. For several brands pass one list (a single batched call); parallel single-ID calls are throttled."
    • addedInput schema / properties / sort_by / description
      Added value: +"\"total_impressions\" (highest spend first) or \"relevancy_monthly_grouped\"."
    • addedInput schema / properties / start_date / description
      Added value: +"Filter by impressions start date, YYYY-MM-DD."
    • addedInput schema / properties / status / description
      Added value: +"\"active\" (default), \"inactive\" or \"all\"."
    • addedInput schema / properties / trim / description
      Added value: +"True (default) returns essential fields; False adds full metadata including targeting."
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnlyHint/openWorldHint/non-destructive, and the description layers on substantive extras: server-side throttling of parallel single-ID calls, 1-credit-per-page fetching, the may_be_inactive signal, and the headline-may-be-null-on-video edge case. These are operational traits not visible in any structured field.

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

Conciseness3/5

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

The purpose sentence is front-loaded and well formed, but roughly half the text is show_ad_carousel orchestration policy that belongs with that tool rather than this one, making the block long and partly duplicative. The param guidance in the middle is useful but interleaved with workflow commands.

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?

An output schema exists, and the description still sketches returns (ad content, dates, targeting, media_urls lookup) while covering output richness, pagination via cursor, credit economy, and downstream rendering obligations. Nothing an agent needs to invoke this correctly is missing.

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

Parameters4/5

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

Coverage is 100%, so the schema carries the load and the baseline is 3. The description still adds marginal meaning the schema lacks, such as a concrete min_duration_days=7 example, why include_reach matters (reach and age/gender/country delivery demographics), and the batch-one-list idiom for platform_ids. Much of this nonetheless paraphrases existing schema text.

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?

States a precise verb and resource plus its entry condition: "Use this when you have a Meta Platform ID and want to see what ads a brand is currently running." This cleanly separates it from search_meta_ads_by_keyword (keyword-driven) and get_meta_platform_id (ID resolution).

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

Usage Guidelines5/5

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

Names explicit when-to-use (have a Platform ID), how to batch across brands, and hands off to three named siblings (analyze_ad_image/analyze_ad_video via media_urls, get_competitive_brief for cross-brand comparison, show_ad_carousel for rendering). It also states when the carousel step is skipped (zero ads).

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources