Skip to main content
Glama
swesmith-repos

Meta Ads MCP

search_ads_archive

Search archived Facebook ads by keywords, countries, and ad types to analyze advertising content, spending, and targeting strategies.

Instructions

    Search the Facebook Ads Library archive.

    Args:
        search_terms: The search query for ads.
        ad_reached_countries: List of country codes (e.g., ["US", "GB"]).
        access_token: Meta API access token (optional - will use cached token if not provided).
        ad_type: Type of ads to search for (e.g., POLITICAL_AND_ISSUE_ADS, HOUSING_ADS, ALL).
        limit: Maximum number of ads to return.
        fields: Comma-separated string of fields to retrieve for each ad.

    Example Usage via curl equivalent:
        curl -G \
        -d "search_terms='california'" \
        -d "ad_type=POLITICAL_AND_ISSUE_ADS" \
        -d "ad_reached_countries=['US']" \
        -d "fields=ad_snapshot_url,spend" \
        -d "access_token=<ACCESS_TOKEN>" \
        "https://graph.facebook.com/<API_VERSION>/ads_archive"
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
search_termsYes
ad_reached_countriesYes
access_tokenNo
ad_typeNoALL
limitNo
fieldsNoad_creation_time,ad_creative_body,ad_creative_link_caption,ad_creative_link_description,ad_creative_link_title,ad_delivery_start_time,ad_delivery_stop_time,ad_snapshot_url,currency,demographic_distribution,funding_entity,impressions,page_id,page_name,publisher_platform,region_distribution,spend

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It mentions the resource ('Facebook Ads Library archive') and includes an example with API details, which adds some behavioral context. However, it lacks critical information like rate limits, authentication requirements beyond the optional token, error handling, or pagination behavior, leaving gaps for a mutation-free search tool.

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?

The description is well-structured with a clear purpose statement, parameter explanations, and an example. It's appropriately sized for a tool with 6 parameters. However, the example usage is lengthy and could be more concise, and some sentences (like the curl command) are verbose without adding essential guidance.

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?

Given the tool's complexity (6 parameters, no annotations, but with an output schema), the description is reasonably complete. It covers all parameters in detail and includes an API example, which helps contextualize usage. The presence of an output schema reduces the need to explain return values, but more behavioral context (e.g., rate limits) would enhance completeness.

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?

The description adds significant value beyond the input schema, which has 0% description coverage. It explains each parameter's purpose (e.g., 'search_terms: The search query for ads'), provides examples (e.g., country codes, ad types), and clarifies optionality (e.g., access_token caching). This fully compensates for the schema's lack of descriptions.

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 clearly states the tool's purpose: 'Search the Facebook Ads Library archive.' It specifies the verb ('Search') and resource ('Facebook Ads Library archive'), making the function unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'search' or 'search_pages_by_name', which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With many sibling tools available (e.g., 'search', 'search_interests', 'get_ads'), there's no indication of context, prerequisites, or exclusions. The example usage is helpful but doesn't address tool selection.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/swesmith-repos/pipeboard-co__meta-ads-mcp.36128861'

If you have feedback or need assistance with the MCP directory API, please join our Discord server