Skip to main content
Glama
ScrapeAdLibrary

ScrapeAdLibrary

Official

get_ad

Retrieve full details for a Meta Ad Library ad by ID, including complete text, media, carousel cards, advertiser and payer info, plus EU/UK transparency data.

Instructions

Get the full detail of one ad: complete text, all media and carousel cards, the advertiser profile, who paid for it (payer/beneficiary), and EU (DSA) / UK transparency data (reach, targeted ages, gender, locations, reach breakdown by country and age).

Cost: 2 credits.

Args: ad_id: Ad Library ID (the numeric id returned by search_ads). country: ISO-3166 alpha-2 country for transparency data, or 'ALL' (default).

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": {
      "ad_id": "<ad_id>"
    },
    "name": "get_ad"
  }
}

Input Schema

NameRequiredDescriptionDefault
ad_idYes
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 does disclose a cost ('2 credits') and a data-availability dependency: EU (DSA) / UK transparency fields are gated by the country parameter. It does not discuss behavior for invalid or non-existent ad IDs or ads outside EU/UK jurisdiction.

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?

Front-loaded sentence states the payload contents, followed by a clearly separated cost line and an Args block. Slightly dense enumeration in the first sentence, but every clause adds a returned field the agent cannot get from the schema.

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 values need no explanation, and the description covers cost, parameter formats, and transparency-data scoping. Minor gaps remain around failure modes (invalid ID, no EU/UK data for a given country) for a paid call.

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: ad_id is defined as the numeric Ad Library id returned by search_ads, and country is defined as an ISO-3166 alpha-2 code or 'ALL' with 'ALL' as the default. It adds format, provenance, and default semantics the bare schema lacks.

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 ('Get the full detail of one ad') and then enumerates exactly what detail is returned: creative text, media/carousel cards, advertiser profile, payer/beneficiary, and DSA/UK transparency fields. The 'one ad' framing plus the reference to the numeric `id` returned by search_ads cleanly separates it from the list-oriented sibling search_ads.

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 clear context for use — fetch full detail for a single known ad — and routes the agent to search_ads as the source of a valid ad_id. It does not name when to prefer get_page_ads or get_page instead, but the single-ad scope makes the alternative implicit.

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