Skip to main content
Glama

Search the Ad Library

search_ads
Read-onlyIdempotent

Searches the StealAds Ad Library of public Meta ads by advertiser name, website or keywords, with filters for format, run length, industry, buyer, hook and angle. Returns up to 24 ads per page (default 12) with caption, hook, run dates, delivery evidence and image URLs, plus next_cursor. For a named advertiser or a specific topic; find_winning_ads suits open category inspiration. Results are a capped sample without library totals or complete advertiser coverage. Keyword matching is broad, so rows can be off-topic. Run time is delivery evidence, not proof of sales.

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": {
      "query": "<query>"
    },
    "name": "search_ads"
  }
}

Input Schema

NameRequiredDescriptionDefault
angleNoExact angle filter from a row’s filters.angle, e.g. social_proof. Absent means no filter.
buyerNoWho pays: business_owners = owners/operators; consumers = end consumers; professionals = business buyers or practitioners; any = no buyer filter. With a buyer filter, exact matches come back in ads and unknown-profile or adjacent business buyers in a separate nearby group (at most 25% of the page); exact_count and nearby_count report each group.
queryYesAdvertiser name, website or product keywords, e.g. protein powder. Up to 200 characters.
cursorNonext_cursor from the previous page with the same query and filters; absent for the first page. A page can be empty while has_more is true.
formatNostatic = image ads; video = video ads. Absent means both.
audienceNoWho it targets, e.g. restaurant owners or main street business owners. Ranks stored audience, buyer label, industry and ad-copy evidence. When supplied, industry_slug is a hard constraint; inferred categories can broaden.
brand_idNoOptional brand id from list_brands. Marks rows from that brand's competitors with your_rival; narrows nothing unless tracked_rivals_only is true.
hook_typeNoExact hook filter from a row’s hook_type_filter, e.g. urgency. Absent means no filter.
max_resultsNoAds per page, 1 to 24 (default 12).
min_run_daysNoOnly ads observed running for at least this many days (0 to 36500).
presentationNoDisplay hint; search returns data only. Selected results can be displayed by show_ad_gallery.
competitor_idNoRestricts results to one saved competitor: a competitor id from list_competitors.
industry_slugNoIndustry slug from a row’s filters.industry_slug, e.g. fitness-software. Parent categories include their child categories; a leaf category selects that exact category. Absence permits inferred related categories.
search_anglesNoUp to three related products, offers or advertiser names that widen a category_leaders search; refused with exact intent. Not format or hook labels.
search_intentNoexact (default) matches the query words or advertiser and supports cursors. category_leaders samples the category across related angles in one page without a cursor, as find_winning_ads does.
has_spoken_hookNotrue: only ads with an extracted spoken (verbal) hook. false: only ads without one. Absent means all ads.
response_formatNoOutput format: text (default) is readable text with image previews and links; json returns the structured rows. table is refused by Ad Library tools.
facebook_page_idNoRestricts results to one advertiser: a facebook_page_id from search_advertisers.
tracked_rivals_onlyNotrue restricts results to ads from the brand's tracked competitors; needs brand_id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changed
    • changedInput schema / properties / brand_id / description
      Previous value: -"Brand context: labels your rivals; does not narrow the library."New value: +"Optional brand id from list_brands. Marks rows from that brand's competitors with your_rival; narrows nothing unless tracked_rivals_only is true."
    • changedInput schema / properties / buyer / description
      Previous value: -"Who pays: business_owners = owners/operators; consumers = end consumers; professionals = business buyers or practitioners; any = no buyer filter. Missing classifications use audience and ad-copy evidence as needed."New value: +"Who pays: business_owners = owners/operators; consumers = end consumers; professionals = business buyers or practitioners; any = no buyer filter. With a buyer filter, exact matches come back in ads and unknown-profile or adjacent business buyers in a separate nearby group (at most 25% of the page); exact_count and nearby_count report each group."
    • changedInput schema / properties / competitor_id / description
      Previous value: -"Competitor reference from list_competitors (e.g. the returned competitor id)."New value: +"Restricts results to one saved competitor: a competitor id from list_competitors."
    • changedInput schema / properties / cursor / description
      Previous value: -"next_cursor from the previous page with the same query and filters. Empty pages can still have more results."New value: +"next_cursor from the previous page with the same query and filters; absent for the first page. A page can be empty while has_more is true."
    • changedInput schema / properties / facebook_page_id / description
      Previous value: -"Facebook page identity returned by advertiser search."New value: +"Restricts results to one advertiser: a facebook_page_id from search_advertisers."
    • changedInput schema / properties / max_results / description
      Previous value: -"Maximum number of results in this bounded response; constrained by the field maximum."New value: +"Ads per page, 1 to 24 (default 12)."
    • changedInput schema / properties / min_run_days / description
      Previous value: -"Minimum observed run duration in days, from 0 to 36500."New value: +"Only ads observed running for at least this many days (0 to 36500)."
    • changedInput schema / properties / query / description
      Previous value: -"Advertiser name, website or product keywords, e.g. protein powder."New value: +"Advertiser name, website or product keywords, e.g. protein powder. Up to 200 characters."
    • changedInput schema / properties / response_format / description
      Previous value: -"Response format. Defaults to readable text; json returns the closed public data contract. Library tools refuse table; use text or json."New value: +"Output format: text (default) is readable text with image previews and links; json returns the structured rows. table is refused by Ad Library tools."
    • changedInput schema / properties / search_angles / description
      Previous value: -"Related products, offers or advertiser names to explore in category searches; not format classification labels."New value: +"Up to three related products, offers or advertiser names that widen a category_leaders search; refused with exact intent. Not format or hook labels."
    • changedInput schema / properties / search_intent / description
      Previous value: -"What the requested ad research should help discover."New value: +"exact (default) matches the query words or advertiser and supports cursors. category_leaders samples the category across related angles in one page without a cursor, as find_winning_ads does."
    • changedInput schema / properties / tracked_rivals_only / description
      Previous value: -"Search this brand’s tracked rivals only. Requires brand_id."New value: +"true restricts results to ads from the brand's tracked competitors; needs brand_id."
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive), yet the description still adds real behavior: page size defaults and hard cap, next_cursor return, truncated captions, and the fact that results are a sample with no library totals. It also flags that run time is delivery evidence rather than proof of sales, which prevents a costly misinterpretation.

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

Conciseness5/5

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

Six tight sentences, front-loaded with what it does and what it returns before the caveats. Every sentence carries information an agent would otherwise have to guess: page size, return fields, the alternative tool, and the interpretation limits.

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?

For a 19-parameter search with no output schema, the description covers return shape, pagination, sampling limits and interpretation warnings. It stops short of explaining how the filter combinations interact (e.g. audience broadening vs industry_slug), but that detail is largely carried by the schema itself.

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, but the description contributes meaning the schema does not: keyword matching is broad and can return off-topic rows, and the response includes an open-ended next_cursor alongside a fixed per-page cap. It does not attempt to restate the 19 individual parameters, which is appropriate given the schema quality.

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 ('Search the StealAds Ad Library of public Meta ads') and enumerates the match dimensions (advertiser name, website, keywords) plus the filter axes. It also names the sibling it is not, find_winning_ads, so the 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?

'For a named advertiser or a specific topic; find_winning_ads suits open category inspiration' gives an explicit when-to-use plus a named alternative with its own condition. The caveats about capped sampling and broad keyword matching further tell the agent when this result set is and isn't trustworthy.

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.