Skip to main content
Glama

Groundsocial

Search the Meta Ad Library

facebook_ads_search
Read-onlyIdempotent

Search the Meta Ad Library by keyword: 30 ads a page with country, status, media, category, language, placement and date filters.

Ads whose text matches q, 30 a page, by impressions (default) or most recent. The first page carries count, Meta’s estimate of all matches (capped at 50,001). Filters: country (default ALL), status (default active), media_type, ad_type (special categories), language, publisher_platforms, start_date/end_date (delivery window). Each ad: ad_archive_id, page_id/page_name, start_date/end_date (Unix seconds), publisher_platform, collation_count, and snapshot (text, title, link, CTA, images, videos, cards). For one advertiser’s ads use facebook_ads_company.

Cost: 2 credits per call, refunded automatically if the call fails. Read-only, public data only. Results include cost_credits and credits_remaining.

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": {
      "q": "<q>"
    },
    "name": "facebook_ads_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
qYesKeyword or phrase.
afterNoThe previous page’s `page_info.end_cursor`; keep the other filters the same.
statusNoactive (default), inactive, or all.
ad_typeNoall (default), or one of Meta’s special ad categories: political_and_issue_ads, housing, employment, credit, financial.
countryNoISO 3166-1 alpha-2 country the ads reached (US, GB, DE…), or ALL (default).
sort_byNototal_impressions (default, high to low), relevancy_monthly_grouped (most recent), or total_active_time (longest-running first, within each page of 30).
end_dateNoYYYY-MM-DD: only ads delivered on or before this day.
languageNoComma-separated ISO 639-1 languages of the ad text (en,es).
media_typeNoall (default), image, video, meme (image with text), image_and_meme, none (text only).
start_dateNoYYYY-MM-DD: only ads delivered on or after this day.
search_typeNokeyword_unordered (default: all the words, any order) or keyword_exact_phrase.
publisher_platformsNoComma-separated placements: facebook, instagram, audience_network, messenger, whatsapp, threads, oculus.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing cost (2 credits per call, refunded on failure), that only public read-only data is returned, that results include cost_credits and credits_remaining, and that the first page's count is Meta's estimate capped at 50,001. These are exactly the operational facts an agent needs before spending credits on a call.

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?

Front-loaded with the core action, then result shape, then filters, then cost — a sensible order. There is mild redundancy between the first sentence's filter enumeration and the later filter breakdown, which keeps it from being maximally tight.

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 no output schema, the description carries the burden of describing returns, and it does: per-ad fields (ad_archive_id, page_id/page_name, dates in Unix seconds, publisher_platform, collation_count, snapshot contents) plus pagination and cost metadata. Nothing material for correct invocation is missing for a 12-parameter search tool.

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 baseline is 3; the description still adds value by explaining sort semantics in plain terms (impressions vs. most recent vs. longest-running) and by tying filters to the delivery window and the pagination contract. It mostly mirrors the schema's own filter list rather than adding syntax detail, so it stops short of a 5.

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?

Opens with a specific verb and resource ("Search the Meta Ad Library by keyword") and immediately scopes the result shape (30 ads a page). It explicitly distinguishes itself from the sibling facebook_ads_company for single-advertiser queries, so an agent can route without opening either schema.

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?

States when to use it (keyword search across the Ad Library) and when not to, naming facebook_ads_company as the alternative for one advertiser's ads. It also documents defaults for the key filters (country=ALL, status=active) so an agent knows what happens if it omits them.

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.