Skip to main content
Glama
ScrapeAdLibrary

ScrapeAdLibrary

Official

get_page_ads

List a competitor's Meta ads, newest and most relevant first, to analyze their active or inactive campaigns by country, platform, and media type.

Instructions

List the ads of one advertiser (competitor), newest and most relevant first.

Cost: 1 credit per 10 ads returned, rounded up; an empty result costs 0.

Args: page_id: Numeric advertiser page ID (use search_pages to find it from a brand name). country: ISO-3166 alpha-2 country or 'ALL' (default). status: 'active' (default), 'inactive' or 'all'. media_type: 'all', 'image', 'video', 'meme' or 'none'. platforms: Subset of facebook, instagram, messenger, audience_network, threads. languages: ISO-639-1 language codes. active_from: YYYY-MM-DD. active_to: YYYY-MM-DD. sort: 'relevance' (default) or 'impressions'. limit: Ads per page, 1-50 (default 10). cursor: next_cursor from a previous call, to get the next page (same filters).

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": {
      "page_id": "<page_id>"
    },
    "name": "get_page_ads"
  }
}

Input Schema

NameRequiredDescriptionDefault
sortNorelevance
limitNo
cursorNo
statusNoactive
countryNoALL
page_idYes
active_toNo
languagesNo
platformsNo
media_typeNoall
active_fromNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/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 discloses the unusual trait an agent most needs: a credit cost model ('1 credit per 10 ads returned, rounded up; an empty result costs 0'). It also reveals filtering defaults (status 'active', country 'ALL', media_type 'all') that silently narrow results. It stops short of describing error behavior or whether failed calls consume credits.

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?

Front-loaded purpose sentence, then a self-contained cost line, then a clean per-argument list. No filler; each line adds information the schema lacks.

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

Completeness5/5

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

For an 11-parameter, annotation-free tool, the definition covers scope, cost, defaults, all parameter formats, and pagination. An output schema exists, so leaving return-value detail out is appropriate.

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

Parameters5/5

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

Schema coverage is 0%, so the description must compensate, and it does: it documents every parameter with value formats (ISO-3166 alpha-2, ISO-639-1, YYYY-MM-DD, limit 1-50), lists enum options, and explains cursor semantics including that the next page reuses the same filters.

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 plus scope: 'List the ads of one advertiser (competitor), newest and most relevant first.' The single-advertiser framing and the pointer to search_pages for resolving page_id let an agent distinguish this from an open-ended ad search without opening the 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?

Gives a concrete prerequisite ('page_id: ... use search_pages to find it from a brand name') and explains pagination via the cursor field. It does not explicitly say when to prefer this over search_ads, so routing guidance is implied rather than stated.

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