Skip to main content
Glama
pralayasimha23

meta-ads-mcp

estimate_audience_size

Estimate audience size for Meta Ads targeting specifications. Predict reach for demographics, interests, and behaviors to validate targeting before launching campaigns.

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
targetingNo
account_idNo
access_tokenNo
interest_listNo
optimization_goalNoREACH
interest_fbid_listNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations present, the description carries the full burden of behavioral disclosure. It provides valuable context: access_token is optional and falls back to a cached token, account_id is required for comprehensive estimation, interest_list and interest_fbid_list are deprecated backward-compatibility parameters, and optimization_goal defaults to 'REACH' with stated options. It also describes the return value as a JSON string including estimated_audience_size and reach_estimate. This goes well beyond a terse description, though it does not cover error cases or rate limits.

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?

The description is well-structured with a leading summary sentence, followed by Args and Returns sections. The example targeting object is highly informative without being bloated. Every sentence contributes value, including the explicit deprecation notices. It is appropriately sized for a complex tool and does not waste words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has 6 parameters, zero annotations, and an output schema. The description covers all core aspects: what it does, when to use it, each parameter's purpose and format, deprecated options, and the shape of the return value. The provided example fills in gaps that the abstract schema cannot. Given the tool's complexity and the absence of annotations, the description is notably complete.

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 description coverage is 0%, so the description must compensate for the input schema's bare property definitions. It does so thoroughly: every parameter is explained in the Args section, with details like 'format: act_XXXXXXXXX' for account_id, a concrete JSON example for targeting, a list of options for optimization_goal, and explicit deprecation notes for legacy params. This adds meaning far beyond the schema's type and default declarations.

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 opens with a specific, action-oriented statement: 'Estimate audience size for targeting specifications using Meta's delivery_estimate API.' This clearly identifies the resource (audience size estimation) and the target API, and it distinguishes the tool from siblings like search_interests or search_geo_locations by focusing on estimation rather than discovery. The mention of 'comprehensive audience estimation for complex targeting combinations' further clarifies its scope.

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 on when to use the tool: for comprehensive estimation of complex targeting combinations (demographics, geography, interests, behaviors) and for backwards-compatible simple interest validation. It stops short of explicitly naming alternative tools for different use cases or saying 'use X instead,' but the guidance is sufficient to place the tool correctly among its siblings.

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/pralayasimha23/meta-ads-mcp'

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