Skip to main content
Glama
Captapi MCP Server

Captapi MCP Server

Official

Facebook Company Ads

facebook_ad_library_company_ads

Retrieve Facebook Ad Library ads for one Meta page to inspect active campaigns by country, with cursor pagination and optional 24-hour cache.

Instructions

Ads for one Meta page — active by default, cursor through the HTML batch, same envelope as /facebook/search. 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": {
      "url": "<url>"
    },
    "name": "facebook_ad_library_company_ads"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYespageId from /search-companies (preferred), libraryUrl, vanity page URL (facebook.com/nike/), or Ad Library URL with view_all_page_id. Do not pass profileId from facebook.com/{digits}/ when it differs from pageId. The URL platform must match this endpoint's platform. Do not pass cross-platform URLs, e.g. YouTube to TikTok, Instagram to Facebook, LinkedIn to X/Twitter, or Pinterest to Rumble.
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 on the native path; the extended fallback bills per returned ad.
cursorNoPagination cursor from a previous nextCursor. Pages through the current Meta HTML result batch.
statusNoAd delivery status: ACTIVE (default), INACTIVE, or ALL. Use ACTIVE for "what are they running now?".
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

A3.5/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full burden, and it does disclose important behavior: 2 credits per call, no charge for empty results or failures, a 24h cache with a fresh-by-default policy, and cursor paging limited to the current HTML result batch. It still does not explain what the response envelope actually contains beyond pointing at '/facebook/search', nor what failure modes beyond empty results look like.

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?

Roughly three dense sentences, front-loaded with purpose and followed by cost, caching, and paging facts; every clause carries information. Some internal jargon ('HTML batch', 'same envelope as /facebook/search') is opaque without prior knowledge of the sibling endpoint, costing a point.

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 six-parameter listing tool with no output schema and no annotations, the description covers the essentials an agent needs: billing, free-on-failure policy, cache control, and pagination scope. The gap is the return shape, which is deferred to a sibling endpoint reference rather than described.

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 description coverage is 100%, so the baseline is 3. The description only re-states defaults already in the schema (active by default, cache semantics, cursor paging) without adding syntax, format, or interaction rules the schema lacks.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names the resource precisely: ads for one Meta page, with the scope (single page) and the default status filter stated up front. It distinguishes itself implicitly from the keyword-oriented sibling facebook_ad_library_search by emphasizing 'one Meta page', but never names that sibling or any other alternative explicitly.

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

Usage Guidelines3/5

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

There is practical guidance on the cost/caching tradeoff ('Pass cache=true for a free 24h cache hit, default always fresh') and on the default active-only behavior. What's missing is explicit routing guidance: nothing says when to pick this tool over facebook_ad_library_search or the per-ad detail tools, so the agent must infer that this is the bulk-listing endpoint.

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