Skip to main content
Glama
thenavidm

Facebook Ad Library MCP

by thenavidm

Build an Ad Library URL

ad_library_url
Read-onlyIdempotent

Convert search filters into a public Meta Ad Library URL so you can open the same search in a browser, verify results, and distinguish no results from blocked searches.

Instructions

Turn a set of filters into the public Ad Library URL, so a person can open the same search in a browser and check the results independently. Useful when a search comes back empty and you need to tell 'no results' apart from 'blocked'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNoKeyword to search for.
countryNoTwo-letter country code. Default US.
page_idNoAdvertiser Page ID, instead of a keyword.
media_typeNo
active_statusNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.6.1
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedOutput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
  2. First observedv0.4.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive/no-open-world, so safety is covered. The description adds real behavioral context beyond that: the output is a human-openable public URL for independent verification, and the tool is a diagnostic fallback. It doesn't mention form/expiry of the URL, but the added context is substantive.

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?

Two sentences, front-loaded with what the tool produces, followed by the diagnostic rationale. No filler, no repetition of the title or 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 (the URL) so return values need no explanation, and annotations cover the safety profile. The description supplies purpose plus the key diagnostic rationale, leaving only minor gaps such as whether any filter combination is invalid.

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?

At 60% schema description coverage, three params (query, country, page_id) are documented in the schema and two (media_type, active_status) are covered only by self-explanatory enums. The description adds nothing parameter-specific beyond the generic word 'filters', so the schema does the heavy lifting and the baseline 3 applies.

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: it 'turns a set of filters into the public Ad Library URL.' That is unambiguous and clearly distinct in kind from the retrieval siblings (search_ads, get_ad), though it never names an alternative tool to contrast against, so it stops short of a 5.

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?

It gives a concrete usage context — diagnosing whether an empty search means 'no results' versus 'blocked' — which is exactly the situation that selects this tool over search_ads. It provides no explicit when-not-to-use or named alternative, so 4 rather than 5.

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