Skip to main content
Glama
Facebook Ads Library MCP Server

Facebook Ads Library MCP Server

search_meta_ads_by_keyword

Read-only

Find who advertises a product, niche, or creator partnership by searching the whole Meta Ad Library with any keyword or phrase, even without knowing the advertiser. Returns page_id and page_name for follow-up.

Instructions

Search the whole Meta Ad Library by keyword, topic or phrase, without knowing the advertiser. Use it to find who advertises a product or problem, ads in a niche, or partnership ads run through creators (get_meta_ads only returns a brand's own page). Returns ads with page_id and page_name, so you can follow up with get_meta_ads on any advertiser.

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_meta_ads_by_keyword"
  }
}

Input Schema

NameRequiredDescriptionDefault
trimNo
limitNo
queryYes
statusNo
countryNo
sort_byNo
end_dateNo
media_typeNo
start_dateNo
search_typeNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so safety is covered. The description adds real behavioral context beyond them: it searches the entire library rather than one brand's page, and it returns page_id and page_name specifically so the agent can chain into get_meta_ads. It does not mention rate limits, result caps, or paging behavior, which keeps it below a 5.

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?

Three sentences, front-loaded with the core action and scope, with the sibling comparison placed where it disambiguates. The use-case list earns its place, though the parenthetical could be tightened slightly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be described, but the tool exposes eight optional filtering and paging parameters with zero documentation in either the schema or the description. For a search tool where filter semantics (country codes, date formats, search_type values) determine result quality, this is a substantial gap.

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

Parameters2/5

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

Schema description coverage is 0% across 10 parameters, so the description carries the full burden and mostly fails it. It only implicitly maps to `query`; filters like country, status, start_date/end_date, media_type, search_type, sort_by, limit and trim get no explanation of format or accepted values anywhere in the definition.

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 whole Meta Ad Library by keyword, topic or phrase") and immediately scopes it against the sibling: "get_meta_ads only returns a brand's own page." An agent can distinguish the two 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?

Gives concrete when-to-use cases (find who advertises a product or problem, ads in a niche, creator partnership ads) and names the alternative tool plus the condition that selects it. Nothing about tool choice is left to inference.

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