Skip to main content
Glama

Get Meta Ad Library Ads

get_meta_ads
Read-only

Use this to see what ads a brand is currently running on Meta — pass Meta Platform ID(s) or brand name(s) (a name resolves to its top-ranked page, so no get_meta_platform_id call is needed). 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

NameRequiredDescriptionDefault
trimNoTrue (default) returns essential fields; False adds full metadata including targeting.
limitNoMax ads per platform ID (default 30, max 1000), fetched in 30-ad pages at 1 credit each. Raise it only for an exhaustive audit; the response cursor fetches the next page.
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(s) from get_meta_platform_id, or brand name(s) like "Nike" (resolved to the top-ranked page, 1 extra credit per name). 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

NameRequiredDescriptionDefault
_mcp_instructionsNoServer-issued metadata for this conversation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / limit / default
      Previous value: -100New value: +30
    • changedInput schema / properties / limit / description
      Previous 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."New value: +"Max ads per platform ID (default 30, max 1000), fetched in 30-ad pages at 1 credit each. Raise it only for an exhaustive audit; the response cursor fetches the next page."
    • changedInput schema / properties / platform_ids / description
      Previous 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."New value: +"Meta Platform ID(s) from get_meta_platform_id, or brand name(s) like \"Nike\" (resolved to the top-ranked page, 1 extra credit per name). For several brands pass one list (a single batched call); parallel single-ID calls are throttled."
  2. 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."
  3. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Goes well past the readOnly/openWorld annotations: it warns that parallel single-ID calls are rate-limited server-side and will fail, discloses credit costs (1 per page, 1 extra per name resolution), explains the may_be_inactive signal, and flags that headline may be null on video ads. These are exactly the failure modes and cost traps an agent needs disclosed.

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 retrieval guidance is front-loaded and efficient, but roughly half the text is a lengthy, repetitive mandate about show_ad_carousel ('NEVER stack carousels back-to-back', 'Never render just 2-3 ads', 'Don't finish a turn...'), which is workflow policy for a sibling tool rather than a definition of this one. The core definition is buried under that volume.

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?

With 16 parameters, a full output schema, and 100% schema description coverage, the description fills the remaining gaps: batching strategy, credit economics, pagination cursor behavior, and the downstream carousel contract. Nothing needed to invoke this tool 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?

Schema coverage is 100%, so the baseline is 3; the description adds real value on the highest-risk parameter by insisting platform_ids be a single batched list with a concrete example, and reinforces the semantics of min_duration_days, active_only, status and sort_by. The remaining optional params (country, language, start_date/end_date) are left entirely to the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb+resource+scope: 'see what ads a brand is currently running on Meta', and clarifies that a brand name resolves the platform ID internally. It never explicitly contrasts with the sibling search_meta_ads_by_keyword, so the brand-vs-keyword distinction is left implicit rather than stated.

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?

Gives concrete when-to-use rules for nearly every optional flag: min_duration_days: 7 for proven winners, active_only for running ads, status='inactive' for retired creatives, sort_by for spend ordering, include_reach for audience questions. It also names the follow-up path (get_competitive_brief) and the required rendering step (show_ad_carousel).

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