Skip to main content
Glama

facebook_ad_library_search_companies

Find Meta Ad Library pages by brand — name-matched, pageId for company-ads (not profileId). Costs 2 credits. Empty results and failures are never charged. Pass cache=true for a free 24h cache hit (default always fresh).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qYesCompany or brand name to search for (min 2 characters). Name-matched — off-brand pages are dropped.
cacheNoSet true to serve from the 24h response cache (0 credits on hit). Default false — always fetch fresh.
limitNoMax items to return (default 20, max 200). Flat 2 credits per call.
countryNoTwo-letter ISO country code. Default US. Non-ISO codes are a definitive 400 INVALID_COUNTRY.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / country / description
      Previous value: -"Two-letter ISO country code. Default US."New value: +"Two-letter ISO country code. Default US. Non-ISO codes are a definitive 400 INVALID_COUNTRY."
  2. Changed1 schema field changed
    • changedInput schema / properties / cache / description
      Previous value: -"Set true to serve from the 24h response cache (0 credits on hit). Default false — always fetch fresh. Envelope includes cached + cachedAt on hits."New value: +"Set true to serve from the 24h response cache (0 credits on hit). Default false — always fetch fresh."
  3. Changed4 schema fields changed
    • changedInput schema / properties / cache / description
      Previous value: -"Set true to serve from the 24h response cache. Default false — always fetch fresh data."New value: +"Set true to serve from the 24h response cache (0 credits on hit). Default false — always fetch fresh. Envelope includes cached + cachedAt on hits."
    • changedInput schema / properties / country / description
      Previous value: -"ISO country code. Default US."New value: +"Two-letter ISO country code. Default US."
    • changedInput schema / properties / limit / description
      Previous value: -"Max items to return. Default 20, max 200. Billed per result."New value: +"Max items to return (default 20, max 200). Flat 2 credits per call."
    • changedInput schema / properties / q / description
      Previous value: -"Search query or keywords (min 2 chars)."New value: +"Company or brand name to search for (min 2 characters). Name-matched — off-brand pages are dropped."
  4. Changed1 schema field changed
    • changedInput schema / properties / cache / description
      Previous value: -"Responses are cached for 24 hours by default. Set false to bypass the cache and always fetch fresh data (default true)."New value: +"Set true to serve from the 24h response cache. Default false — always fetch fresh data."
  5. Changed1 schema field changed
    • addedInput schema / properties / cache
      Added value: +{
      +  "description": "Responses are cached for 24 hours by default. Set false to bypass the cache and always fetch fresh data (default true).",
      +  "type": "boolean"
      +}
  6. Added

TDQS

A4.4/5.0
Behavior4/5

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

No annotations are provided, so the description must carry the full behavioral burden. It discloses cost (2 credits), that empty results and failures are never charged, and the caching behavior (cache=true for free 24h hit). It does not mention rate limits or response format, but covers the key operational traits for a search tool.

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?

The description is a single sentence that packs purpose, cost, failure policy, and caching into a front-loaded structure. It starts with the core function and adds key details without wasted words.

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 search tool with no output schema and no annotations, it covers cost, caching, and failure behavior. It does not detail response structure or rate limits, but these are minor given the tool's simplicity. The name-matching behavior is also hinted at in the schema, and the pageId vs profileId note adds context. Overall, it is adequate and nearly complete.

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 adds the pageId vs profileId distinction for the q parameter, which clarifies the output semantics and is not present in the schema. It also reiterates cost and cache behavior, but those are operational rather than parameter-specific. The added pageId distinction justifies a 4.

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: 'Find Meta Ad Library pages by brand'. It distinguishes from siblings by noting 'pageId for company-ads (not profileId)', which separates it from generic search and profile-related tools. The purpose is unambiguous and clearly tied to company-brand pages.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear context: it is for brand/company pages and returns pageId for company-ads rather than profileId. This implies when to use it over profile-focused tools, but it does not explicitly name alternatives or state exclusions, so guidance is implicit rather than explicit.

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.