Skip to main content
Glama
swesmith-repos

Meta Ads MCP

get_insights

Retrieve performance insights for Meta Ads campaigns, ad sets, ads, or accounts to analyze metrics and optimize advertising strategies.

Instructions

Get performance insights for a campaign, ad set, ad or account.

Args:
    object_id: ID of the campaign, ad set, ad or account
    access_token: Meta API access token (optional - will use cached token if not provided)
    time_range: Either a preset time range string or a dictionary with "since" and "until" dates in YYYY-MM-DD format
               Preset options: today, yesterday, this_month, last_month, this_quarter, maximum, data_maximum, 
               last_3d, last_7d, last_14d, last_28d, last_30d, last_90d, last_week_mon_sun, 
               last_week_sun_sat, last_quarter, last_year, this_week_mon_today, this_week_sun_today, this_year
               Dictionary example: {"since":"2023-01-01","until":"2023-01-31"}
    breakdown: Optional breakdown dimension. Valid values include:
               Demographic: age, gender, country, region, dma
               Platform/Device: device_platform, platform_position, publisher_platform, impression_device
               Creative Assets: ad_format_asset, body_asset, call_to_action_asset, description_asset, 
                              image_asset, link_url_asset, title_asset, video_asset, media_asset_url,
                              media_creator, media_destination_url, media_format, media_origin_url,
                              media_text_content, media_type, creative_relaxation_asset_type,
                              flexible_format_asset_type, gen_ai_asset_type
               Campaign/Ad Attributes: breakdown_ad_objective, breakdown_reporting_ad_id, app_id, product_id
               Conversion Tracking: coarse_conversion_value, conversion_destination, standard_event_content_type,
                                   signal_source_bucket, is_conversion_id_modeled, fidelity_type, redownload
               Time-based: hourly_stats_aggregated_by_advertiser_time_zone, 
                          hourly_stats_aggregated_by_audience_time_zone, frequency_value
               Extensions/Landing: ad_extension_domain, ad_extension_url, landing_destination, 
                                  mdsa_landing_destination
               Attribution: sot_attribution_model_type, sot_attribution_window, sot_channel, 
                           sot_event_type, sot_source
               Mobile/SKAN: skan_campaign_id, skan_conversion_id, skan_version, postback_sequence_index
               CRM/Business: crm_advertiser_l12_territory_ids, crm_advertiser_subvertical_id,
                            crm_advertiser_vertical_id, crm_ult_advertiser_id, user_persona_id, user_persona_name
               Advanced: hsid, is_auto_advance, is_rendered_as_delayed_skip_ad, mmm, place_page_id,
                        marketing_messages_btn_name, impression_view_time_advertiser_hour_v2, comscore_market,
                        comscore_market_code
    level: Level of aggregation (ad, adset, campaign, account)
    limit: Maximum number of results to return per page (default: 25, Meta API allows much higher values)
    after: Pagination cursor to get the next set of results. Use the 'after' cursor from previous response's paging.next field.
    action_attribution_windows: Optional list of attribution windows (e.g., ["1d_click", "7d_click", "1d_view"]).
               When specified, actions include additional fields for each window. The 'value' field always shows 7d_click.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
object_idYes
access_tokenNo
time_rangeNomaximum
breakdownNo
levelNoad
limitNo
afterNo
action_attribution_windowsNo

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 adds useful context about pagination ('after' cursor usage), default values (limit default: 25), and API-specific behavior (Meta API allows higher limit values). However, it doesn't cover important aspects like rate limits, authentication requirements beyond the optional token, error handling, or whether this is a read-only operation (though 'Get' implies reading).

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 followed by detailed parameter explanations. While lengthy due to the comprehensive parameter documentation, every section earns its place by adding necessary context. It could be more front-loaded with usage guidance, but the information density is appropriate for an 8-parameter tool with complex options.

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 (8 parameters, no annotations, but with output schema), the description provides substantial context. It thoroughly documents parameters and their semantics, though it lacks guidance on when to use this versus siblings. The presence of an output schema reduces the need to describe return values, but additional behavioral context (like rate limits or error cases) would improve 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 provides extensive parameter documentation beyond the schema, which has 0% description coverage. It explains each parameter's purpose, format options, valid values (especially for 'breakdown' with detailed categories), and behavioral implications. For example, it clarifies that 'time_range' accepts either preset strings or date dictionaries, and 'action_attribution_windows' affects output fields. 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: 'Get performance insights for a campaign, ad set, ad or account.' It specifies the verb ('Get') and resource ('performance insights') with the target objects. However, it doesn't explicitly differentiate from sibling tools like 'get_ad_details' or 'get_campaign_details' which might also provide insights, though those seem more focused on metadata rather than performance metrics.

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. It doesn't mention sibling tools or explain scenarios where this is preferred over other data retrieval tools like 'get_ad_details' or 'search'. The only implied usage is for performance insights, but no explicit context or exclusions are provided.

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