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). USE THIS WHEN THE USER ASKS: "what ads is X running", "X's Facebook/Instagram ads", "X's best/top/winning ads" (set include_reach=true), "how often does X launch new creatives", "what's new from X this week". 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). Pass an ad's ad_id + page_id to 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. For UGC/creator-style or polished brand video ads (creative references), set style='ugc' or 'brand' (video only; 1 extra credit when new creatives get classified). Set status='inactive' to see retired creatives; for past campaigns (e.g. an election period) pass start_date/end_date, which searches all statuses. Each ad carries is_active and end_date (last day shown). Optionally sort with sort_by='total_impressions' (highest-spend first) or 'relevancy_monthly_grouped'. get_competitive_brief compares several brands' ads and surfaces patterns. get_playbook has written methods for hooks, scripts, angles and product research. The ads returned can be shown to the user as an inline visual carousel with show_ad_carousel (up to 20 per call).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "platform_ids": "<platform_ids>"
    },
    "name": "get_meta_ads"
  }
}

Input Schema

NameRequiredDescriptionDefault
trimNoTrue (default) returns essential fields; False adds full metadata including targeting.
limitNoMax ads per platform ID (default 30, max 1000). Costs 1 credit per 10 ads returned, at least 1 per brand (default 30 = 3 credits; filtered scans at least 2); a scan stops early when daily credits run out. Raise it only for an exhaustive audit. Large results arrive in windows: the response cursor reads the rest for free.
styleNoVideo creative style: "ugc" (a creator or customer filming themselves, handheld/selfie feel) or "brand" (polished brand-produced footage, motion graphics, product UI). Video ads only (implies media_type="video"). Inferred from each video's cover frame; ads whose frame shows too little are kept after the matches with style "unknown". Filters the ads fetched, so a wider limit gives it more to work with (up to 60 new creatives are classified per call). Costs 1 extra credit per call when any creative is newly classified; creatives classified before are free.
cursorNoContinuation token from a previous response. An "rs:" cursor reads ads that call already fetched (free); any other cursor scans further upstream (single platform ID only; offer to continue before spending extra credits).
statusNo"active" (default; "all" when start_date/end_date is set), "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"longest_running" (the default order), "newest", "total_impressions" (highest spend first) or "relevancy_monthly_grouped". longest_running/newest rank only the ads fetched: raise limit or set min_duration_days for a wider net.
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; a filtered scan: at least 2 credits) or "video" (video only).
start_dateNoFilter by impressions start date, YYYY-MM-DD.
active_onlyNoTrue returns only currently running ads (a filtered scan: at least 2 credits).
platform_idsYesMeta Platform ID(s) from get_meta_platform_id, or brand name(s) like "Nike" (resolved to the top-ranked page, 0.5 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, 0.5 credit per ad). Suited to reach, audience and performance questions.
conversation_idNoThe conversation_id this server returned earlier in this conversation, unchanged, including after later user messages. Omit it if you have none. Recorded for the server developer's analytics.
min_duration_daysNoOnly ads that have run for at least this many days (a filtered scan: at least 2 credits).

Output Schema

NameRequiredDescriptionDefault
_mcp_instructionsNoServer-issued metadata for this conversation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / conversation_id / description
      Previous value: -"Echo 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."New value: +"The conversation_id this server returned earlier in this conversation, unchanged, including after later user messages. Omit it if you have none. Recorded for the server developer's analytics."
  2. Changed6 schema fields changed
    • changedInput schema / properties / active_only / description
      Previous value: -"True returns only currently running ads."New value: +"True returns only currently running ads (a filtered scan: at least 2 credits)."
    • changedInput schema / properties / include_reach / description
      Previous 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."New value: +"True adds each ad's EU/UK reach and age/gender/country breakdowns (one upstream call per ad, 0.5 credit per ad). Suited to reach, audience and performance questions."
    • changedInput schema / properties / limit / description
      Previous value: -"Max ads per platform ID (default 30, max 1000). Costs 1 credit for the first 30 ads, then 1 per 10 more (limit=150 is 13 credits); a scan stops early when daily credits run out. Raise it only for an exhaustive audit. Large results arrive in windows: the response cursor reads the rest for free."New value: +"Max ads per platform ID (default 30, max 1000). Costs 1 credit per 10 ads returned, at least 1 per brand (default 30 = 3 credits; filtered scans at least 2); a scan stops early when daily credits run out. Raise it only for an exhaustive audit. Large results arrive in windows: the response cursor reads the rest for free."
    • changedInput schema / properties / media_type / description
      Previous value: -"\"all\" (default), \"image\" (static creatives, including image carousels) or \"video\" (video only)."New value: +"\"all\" (default), \"image\" (static creatives, including image carousels; a filtered scan: at least 2 credits) or \"video\" (video only)."
    • changedInput schema / properties / min_duration_days / description
      Previous value: -"Only ads that have run for at least this many days."New value: +"Only ads that have run for at least this many days (a filtered scan: at least 2 credits)."
    • changedInput schema / properties / platform_ids / description
      Previous 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."New value: +"Meta Platform ID(s) from get_meta_platform_id, or brand name(s) like \"Nike\" (resolved to the top-ranked page, 0.5 credit per name). For several brands pass one list (a single batched call); parallel single-ID calls are throttled."
  3. Changed1 schema field changed
    • addedInput schema / properties / style
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Video creative style: \"ugc\" (a creator or customer filming themselves, handheld/selfie feel) or \"brand\" (polished brand-produced footage, motion graphics, product UI). Video ads only (implies media_type=\"video\"). Inferred from each video's cover frame; ads whose frame shows too little are kept after the matches with style \"unknown\". Filters the ads fetched, so a wider limit gives it more to work with (up to 60 new creatives are classified per call). Costs 1 extra credit per call when any creative is newly classified; creatives classified before are free."
      +}
  4. Changed1 schema field changed
    • changedInput schema / properties / sort_by / description
      Previous value: -"\"total_impressions\" (highest spend first) or \"relevancy_monthly_grouped\"."New value: +"\"longest_running\" (the default order), \"newest\", \"total_impressions\" (highest spend first) or \"relevancy_monthly_grouped\". longest_running/newest rank only the ads fetched: raise limit or set min_duration_days for a wider net."
  5. Changed3 schema fields changed
    • changedInput schema / properties / cursor / description
      Previous 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."New value: +"Continuation token from a previous response. An \"rs:\" cursor reads ads that call already fetched (free); any other cursor scans further upstream (single platform ID only; offer to continue before spending extra credits)."
    • changedInput schema / properties / limit / description
      Previous 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."New value: +"Max ads per platform ID (default 30, max 1000). Costs 1 credit for the first 30 ads, then 1 per 10 more (limit=150 is 13 credits); a scan stops early when daily credits run out. Raise it only for an exhaustive audit. Large results arrive in windows: the response cursor reads the rest for free."
    • changedInput schema / properties / status / description
      Previous value: -"\"active\" (default), \"inactive\" or \"all\"."New value: +"\"active\" (default; \"all\" when start_date/end_date is set), \"inactive\" or \"all\"."
  6. 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."
  7. 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."
  8. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true, openWorldHint=true and destructiveHint=false, so safety is covered. The description goes well beyond that with operational traits an agent could not infer: parallel calls are rate-limited and fail, credits are consumed per scan, results arrive in cursor windows, may_be_inactive signals a possibly paused page, and headline may be null on video ads.

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 intent block is correctly front-loaded, but the rest is a single dense paragraph of run-on sentences that re-explains many schema-documented parameters (sort_by, active_only, min_duration_days, style, status). Roughly a third of the text duplicates the schema, and the mid-paragraph asides about ad_id/page_id and video nulls break the flow.

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?

For a 17-parameter, credit-metered, batch-capable search tool with an output schema, this covers what an agent needs: batching rules, cost implications, pagination via cursor, inactive-page fallbacks, and handoffs to downstream analysis tools. The existing output schema carries return-value detail, so no gap remains.

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

Parameters5/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, but the description adds cross-parameter semantics the schema only partly states: include_reach unlocks reach and age/gender/country demographics, min_duration_days=7 filters to 7+ day ads, status='inactive' surfaces retired creatives, and start_date/end_date implicitly search all statuses. It also gives a concrete batching form, platform_ids=['123','456','789'].

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 specific verb and resource: 'see what ads a brand is currently running on Meta'. It immediately distinguishes itself from siblings by noting no get_meta_platform_id call is needed, and later routes to analyze_ad_image/analyze_ad_video, get_competitive_brief, get_playbook and show_ad_carousel for their respective jobs.

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?

An explicit 'USE THIS WHEN THE USER ASKS' block enumerates real user phrasings ('what ads is X running', 'how often does X launch new creatives') so an agent can pattern-match intent. Alternatives are named with their selection conditions, and a hard exclusion is given: never call this in parallel for different IDs because server-side throttling will fail.

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