Skip to main content
Glama
swesmith-repos

Meta Ads MCP

estimate_audience_size

Estimate potential audience size for Meta Ads campaigns using targeting specifications like demographics, geography, and interests to validate reach before launching.

Instructions

Estimate audience size for targeting specifications using Meta's delivery_estimate API.

This function provides comprehensive audience estimation for complex targeting combinations
including demographics, geography, interests, and behaviors. It also maintains backwards
compatibility for simple interest validation.

Args:
    access_token: Meta API access token (optional - will use cached token if not provided)
    account_id: Meta Ads account ID (format: act_XXXXXXXXX) - required for comprehensive estimation
    targeting: Complete targeting specification including demographics, geography, interests, etc.
              Example: {
                  "age_min": 25,
                  "age_max": 65,
                  "geo_locations": {"countries": ["PL"]},
                  "flexible_spec": [
                      {"interests": [{"id": "6003371567474"}]},
                      {"interests": [{"id": "6003462346642"}]}
                  ]
              }
    optimization_goal: Optimization goal for estimation (default: "REACH"). 
                      Options: "REACH", "LINK_CLICKS", "IMPRESSIONS", "CONVERSIONS", etc.
    interest_list: [DEPRECATED - for backwards compatibility] List of interest names to validate
    interest_fbid_list: [DEPRECATED - for backwards compatibility] List of interest IDs to validate

Returns:
    JSON string with audience estimation results including estimated_audience_size,
    reach_estimate, and targeting validation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
access_tokenNo
account_idNo
targetingNo
optimization_goalNoREACH
interest_listNo
interest_fbid_listNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the tool uses Meta's API and provides some implementation details, but doesn't cover important behavioral aspects like rate limits, authentication requirements beyond the optional token, error handling, or whether this is a read-only operation. The description adds value but leaves significant behavioral gaps.

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 clear sections (purpose, args, returns) and front-loaded key information. While comprehensive, some sentences could be more concise (e.g., the targeting example is detailed but necessary). Overall, most content earns its place in explaining this complex tool.

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, 0% schema coverage), the description does a good job explaining parameters and return values. With an output schema present, the description doesn't need to detail return structure. However, it could better address behavioral aspects given the lack of annotations, leaving some gaps in 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?

With 0% schema description coverage for all 6 parameters, the description provides excellent parameter semantics. It explains each parameter's purpose, provides examples (like the targeting specification), indicates required vs optional status, marks deprecated parameters, and gives default values. This fully compensates for the lack of schema descriptions.

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?

The description clearly states the tool's purpose: 'Estimate audience size for targeting specifications using Meta's delivery_estimate API.' It specifies the verb ('estimate'), resource ('audience size'), and implementation method ('Meta's delivery_estimate API'), distinguishing it from sibling tools like search_interests or get_insights which serve different functions.

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?

The description provides clear context about when to use this tool: for 'comprehensive audience estimation for complex targeting combinations' and 'backwards compatibility for simple interest validation.' However, it doesn't explicitly state when NOT to use it or name specific alternative tools from the sibling list for different use cases.

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