Skip to main content
Glama
ScrapeAdLibrary

ScrapeAdLibrary

Official

search_pages

Find Facebook and Instagram advertiser pages by keyword or brand name and retrieve the page_id needed for page and ad lookups.

Instructions

Find advertisers (Facebook/Instagram pages) that ran ads matching a keyword or brand name. Use it to get the page_id needed by get_page and get_page_ads.

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

Args: query: Brand name or keyword. country: ISO-3166 alpha-2 country or 'ALL' (default). limit: 1-30 (default 10).

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

Input Schema

NameRequiredDescriptionDefault
limitNo
queryYes
countryNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/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 it discloses the most important trait: billing. 'Cost: 1 credit per 10 advertisers returned, rounded up; an empty result costs 0' tells the agent the call is non-free and how volume drives cost. Auth requirements, rate limits, and result ordering are not covered.

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 with purpose, then workflow linkage, then cost, then parameters — a sensible priority order for an agent reading top-down. Every sentence is doing distinct work; the Args block is justified because the schema has no descriptions at all.

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?

An output schema exists, so return-shape explanation is unnecessary, and the cost model plus parameter semantics cover the main unknowns. Missing are pagination/result-count behavior relative to limit and whether country 'ALL' searches globally versus skipping the filter.

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 0%, so the Args block is doing essential work: it names each parameter, gives the ISO-3166 alpha-2 format for country, the 1-30 bound and default 10 for limit, and the 'ALL' sentinel. The only defect is that it calls 'ALL' the default while the schema declares country's default as null, a small inconsistency an agent could stumble on.

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 advertisers (Facebook/Instagram pages) that ran ads matching a keyword or brand name.' It also clarifies the entity returned is an advertiser page, not an ad, which is what separates it from ad-level search siblings, and it names the downstream tools (get_page, get_page_ads) that consume the result.

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 an explicit use case: call this first to obtain the page_id required by get_page and get_page_ads, so the workflow position is clear. It stops short of stating when not to use it (e.g., when you already have a page_id, or when you want ad-level results via search_ads).

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