Skip to main content
Glama
Captapi MCP Server

Captapi MCP Server

Official

Facebook Ad Library Search Companies

facebook_ad_library_search_companies

Search Meta Ad Library by brand name to find matching company pages and get the pageId required for company ads.

Instructions

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).

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

Input 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. First observedv0.5.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does real work: cost of 2 credits per call, no charge on empty results or failures, and a documented 24h cache with free hits versus always-fresh default. It does not cover auth requirements, rate limits, or what a failure response looks like.

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?

Two tight sentences, front-loaded with the identify-and-output purpose, followed by billing and caching facts an agent must know before calling. No filler or repetition.

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 four-parameter read tool with no output schema, it covers purpose, cost, caching, and the key returned identifier (pageId). Some return-shape detail (fields beyond pageId, ordering, pagination) is left unstated, but nothing essential to invoking it correctly is missing.

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

Parameters3/5

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

Schema coverage is 100%, so each parameter is already documented, including the cache/freshness tradeoff and ISO country validation. The description reinforces the cache and name-matching semantics but adds no syntax or format detail beyond the schema, so the baseline applies.

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') plus the constraint that matching is name-based and the output is a pageId for company-ad lookups, not a profileId. That last clause distinguishes it from the sibling company_ads/profile endpoints without the agent needing to open another schema.

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?

Clear about the situation it serves (brand name in, pageId out, off-brand pages dropped) and implicitly routes the agent to a company-ads call with the resulting pageId. It never names the sibling tool explicitly or states when-not to use it, so it falls short of full routing guidance.

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

Deploy Server

Other Tools