Skip to main content
Glama

Fetch an ad from the Meta Ad Library by its ID

meta_ads_get_ad_details
Read-onlyIdempotent

Get one ad from the Meta Ad Library by its Library ID or link: its creative, run dates, platforms and advertiser, who paid for it and who it benefits, and where Meta publishes them, its targeting, reach by country, age and gender, and the audience of ads about social issues, elections or politics. Read-only: returns public data and changes nothing. Costs 1 credit per request.

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": {
      "adId": "<adId>"
    },
    "name": "meta_ads_get_ad_details"
  }
}

Input Schema

NameRequiredDescriptionDefault
adIdYesAd Library ID of the ad, or its Ad Library link, e.g. "1806650610330561" or "https://www.facebook.com/ads/library/?id=1806650610330561".
cacheOnlyNoReturn only a cached result and never scrape live. With `cacheMaxAgeHours`, only a result that recent is returned; without it, the latest cached result of any age. Responds 404, at no cost, when there is none, e.g. true.
cacheMaxAgeHoursNoAccept a cached result scraped up to this many hours ago. A cached result costs no credits, and its `cachedAt` says when it was scraped. When no cached result is that recent, the data is scraped live at the normal price. Leave it out to always scrape live, e.g. 24.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and open-world access, so the description's 'Read-only: returns public data and changes nothing' is largely redundant. It does add genuinely new behavioral information — 'Costs 1 credit per request' — which the annotations never convey; the cache-hit/no-cost path is left to the schema rather than repeated here.

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 with the verb and resource, followed by a compact enumeration of returned data and a short credit-cost sentence. The field list is long, but with no output schema it earns its place as payload disclosure; only the redundant restatement of read-only behavior is wasted wording.

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?

With no output schema, the description correctly compensates by naming the fields returned, and it discloses the per-request cost. Remaining gaps are minor: error/not-found behavior beyond the schema's 404 note and any rate limits are unstated, but nothing needed to invoke the tool 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% and the parameter descriptions are unusually thorough (ID vs. link formats, cacheOnly 404-at-no-cost behavior, cacheMaxAgeHours fallback to live scrape), so the schema does the heavy lifting. The description's 'by its Library ID or link' merely echoes adId and adds no new syntax or constraint detail.

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 states a specific verb and resource ('Get one ad from the Meta Ad Library by its Library ID or link') and enumerates the returned payload (creative, run dates, platforms, advertiser, payer/beneficiary, targeting, reach breakdowns). The singular 'one ad ... by ID' implicitly separates it from the sibling meta_ads_search, but no sibling is named, so it stops short of full differentiation.

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?

Usage is implied rather than stated: an agent infers it should call this when it already holds a Library ID or ad URL, and use meta_ads_search otherwise. There is no explicit when-not clause and no mention of what to do when the ID is unknown or the ad is unavailable; the credit cost is the only operational guidance given.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources