Meta Ads
Facebook and Instagram campaign data and reporting via Meta Marketing API v25.0
33 tools available
Installation
Claude Desktop
{
"mcpServers": {
"hopkin-meta-ads": {
"url": "https://meta.mcp.hopkin.ai",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}
CLI
npm install -g @hopkin/cli
hopkin auth set-key hpk_live_...
hopkin meta ping
Platform Overview
The Meta Ads MCP server gives AI assistants read-only access to Meta (Facebook/Instagram) advertising campaigns through the Meta Marketing API v25.0. It provides comprehensive tools for reading account structure, campaign and audience targeting settings, performance analytics, creative analysis, and pixel health diagnostics — allowing you to automate reporting workflows, retrieve insights at any aggregation level, and debug tracking issues.
Your prompt → Claude + Hopkin → Meta Marketing API v25.0
↓
Campaign Data
Performance Metrics
Audience Insights
Creative Reports
Pixel Health Diagnostics
Common Workflows
Performance Reporting
Get a snapshot of how your campaigns are performing across impressions, clicks, conversions, and return on ad spend.
"What was our total spend, impressions, and ROAS last month?"
Calls meta_ads_get_account_summary with a date range. Returns aggregated account-level metrics in a standardized format for quick overviews without needing to drill down into individual campaigns.
"Show me performance by campaign for January."
Calls meta_ads_get_performance_report with level: 'campaign' and a custom date range. Returns full-funnel metrics (delivery → engagement → conversions → ROAS) broken down by campaign so you can compare which campaigns are driving the most value.
"What are the impressions, clicks, and conversion rate for all active campaigns this week?"
Calls meta_ads_list_campaigns with status filter, then meta_ads_get_insights or meta_ads_get_performance_report at the campaign level for the current week. Returns a table-format response showing each campaign's key metrics side-by-side.
Campaigns, Ad Sets & Ads
View, search, and explore the hierarchy of campaigns, ad sets, and individual ads.
"List all my active campaigns"
Calls meta_ads_list_campaigns with status: ['ACTIVE']. Returns paginated list of active campaigns with names, IDs, statuses, budgets, and recent change history.
"Find ad sets in campaign ABC123 that are paused"
Calls meta_ads_list_adsets with campaign_id: 'ABC123' and status: ['PAUSED']. Returns ad sets filtered by that campaign with pagination, search capability, and optional metrics if include_assets: true.
"Get all ads in ad set XYZ with their creative assets and landing pages"
Calls meta_ads_list_ads with adset_id: 'XYZ' and include_assets: true. Response includes resolved creative media URLs (images, videos) plus a summary section listing all unique landing page URLs found in those ads — ideal for quickly auditing destination URLs without reading every ad individually.
Audience & Creative Analysis
Analyze demographic performance and compare which creative variants are driving engagement.
"Break down our last week's performance by age and gender"
Calls meta_ads_get_insights with date_preset: 'last_7d', level: 'account', and breakdowns: ['age', 'gender']. Returns demographic slice of performance metrics showing which age/gender groups have the highest CTR, conversion rate, and ROAS.
"Show creative performance for all ads, aggregated by creative name"
Calls meta_ads_get_ad_creative_report with level: 'ad_name' and a date range. Returns creative variants grouped by name with full-funnel metrics, highest spend first; each group includes a representative ad_id that can be passed to meta_ads_preview_ads to visually inspect that creative. Rows are compact by default (per-type costs are spend ÷ count; pass full_detail: true to include them), and large reports come back one page at a time: follow nextCursor to see every creative.
"Which video ads have the highest video completion rate?"
Calls meta_ads_get_insights with level: 'ad', fields: ['video_p25_watched_actions', 'video_p50_watched_actions', 'video_p75_watched_actions', 'video_p100_watched_actions'], and a date range. Returns per-ad video completion funnel showing what percentage of viewers watched 25%, 50%, 75%, and 100% of each video.
Budget & Spend Monitoring
Keep tabs on spending and campaign pacing.
"How much have we spent this month across all campaigns?"
Calls meta_ads_get_account_summary with the current month's date range. Returns account-level spend, impressions, clicks, and conversions in one call.
"Show daily spend trend for the past week"
Calls meta_ads_get_performance_report with time_increment: 1 (daily), date_preset: 'last_7d'. Returns spend broken down day-by-day, ideal for spotting anomalies or tracking pacing toward daily/monthly budgets.
Recipes
"I suspect a tracking issue is tanking our ROAS. Check our pixel health first."
Calls meta_ads_get_pixel_health to retrieve pixel metadata, CAPI connection status, event volume, automatic matching config, and diagnostic checks (including event match quality). If CAPI is not connected or event volume is low, tracking is the problem — not campaign performance. This is the essential diagnostic tool before investigating campaign-level metrics.
"Show me the top 3 performing creatives by ROAS this month, with a visual preview of each."
Calls meta_ads_get_ad_creative_report with level: 'ad_id' (ROAS is reported per ad; ad_name rows omit it) and follows nextCursor until every ad is in, since rows come back ranked by spend, not ROAS. Ranks the ads by purchase_roas and keeps the top 3, then calls meta_ads_preview_ads with those ad IDs and includes ROAS as a metric label. Returns visual previews of the creative images/videos alongside the ROAS figure so you can visually compare winners.
"List all paused campaigns, show me their recent change history, and tell me who paused them."
Calls meta_ads_list_campaigns with status: ['PAUSED']. For each campaign ID, calls meta_ads_get_activities with entity_id: <campaign_id> and entity_type: 'CAMPAIGN'. Aggregates the activity logs to show when each campaign was paused and by whom (from the activity record).
"Find underperforming ad sets (low ROAS) within my top-spend campaign and show me their demographic breakdowns."
Calls meta_ads_get_performance_report with level: 'adset', filtered to the top-spend campaign. Identifies ad sets with ROAS below a threshold. For each, calls meta_ads_get_insights with breakdowns: ['age', 'gender'] to find demographic segments (e.g., women 35-44) that are underperforming — useful for tightening audience targeting.
"I need to audit all landing pages being used across active ads. Give me a categorized summary."
Calls meta_ads_list_ads with status: ['ACTIVE'] and include_assets: true. The markdown response includes a "Landing Page URLs" summary section listing all unique destination URLs. Group those by domain (e.g., homepage vs. product pages) to identify which landing pages are live and used by active ads.
"Show me a 90-day performance trend by publisher (Instagram vs. Facebook) to decide where to shift budget."
Calls meta_ads_get_insights with date_preset: 'last_90d', breakdowns: ['publisher_platform'], and optional time_increment: 7 for weekly aggregation. Returns 90-day performance sliced by Instagram, Facebook, Audience Network, etc., so you can see which platform is most efficient and recommend budget reallocation.
Tips
Date Presets vs. Custom Ranges: Use date_preset for standard lookbacks (e.g., last_7d, last_30d, last_quarter) for faster responses. For precise custom ranges, use time_range: { since: '2026-01-01', until: '2026-01-31' }. Both meta_ads_get_insights and meta_ads_get_performance_report support both modes.
Breakdowns Available: Demographic (age, gender, country), device/platform (device_platform, publisher_platform, platform_position), time-based (hourly_stats_aggregated_by_advertiser_time_zone for intra-day analysis), and creative assets (ad_format_asset, video_asset, image_asset, etc.). Not all breakdowns are available at all levels — try the combination first; if unsupported, the API will return an error with guidance.
Cache-First Behavior: List tools (meta_ads_list_campaigns, meta_ads_list_ad_accounts, etc.) return cached data by default with a cached: boolean flag and synced_at timestamp. For real-time data, pass refresh: true. Reporting tools (meta_ads_get_performance_report, meta_ads_get_insights) always fetch fresh data — no caching applies.
Landing Pages in Ad List: When calling meta_ads_list_ads with include_assets: true, the markdown response automatically includes a "Landing Page URLs" summary at the end listing all unique destination URLs found across the ads — saves you from parsing individual ad objects to audit where traffic is going.
Tools
account-summary
meta_ads_get_account_summary Get Meta Ads Account Summary
Standardized account-level performance summary for cross-platform comparison. Normalized format identical to google_ads_get_account_summary. Includes conversion_detail breakdown from both Meta actions and conversions arrays. Preferred over get_insights or get_performance_report for quick account-level overviews. Always fetches fresh data.
| Parameter | Type | Description |
|---|---|---|
account_id required | string | Meta ad account ID |
reason required | string | Why this tool call is needed |
3 optional parameters
| Parameter | Type | Description |
|---|---|---|
date_preset | string | Predefined date range (e.g., last_7d, last_30d, this_month) |
time_range | object | Custom date range {since, until} in YYYY-MM-DD |
connection_id | string | Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs. |
activities
meta_ads_get_activities Get Meta Ads Activities
Retrieve change history (who changed what, and when) for a Meta ad account, or for one campaign, ad set or ad. Hopkin records Meta's activity log continuously and keeps it for 25 months, backfilling up to two years when an account is first synced, so start_date can reach well past the last 7 days. Check coverage.complete_from: if the requested window starts earlier, coverage.note says so — no events before that date does not mean nothing changed. An account synced more than 15 minutes ago is refreshed from Meta first; refresh=true forces it. Dates are UTC and end_date includes the whole day. Paginated: when nextCursor is present, call again with the same parameters plus cursor=<nextCursor>.
| Parameter | Type | Description |
|---|---|---|
account_id required | string | The ad account ID (with or without act_ prefix) |
reason required | string | Why this tool call is needed |
8 optional parameters
| Parameter | Type | Description |
|---|---|---|
entity_id | string | Filter to one campaign, ad set or ad ID. With no start_date, the entity's full recorded history is searched (up to two years). |
entity_type | string | Filter to one level: ACCOUNT, CAMPAIGN, AD_SET or AD. |
start_date | string | Start date, YYYY-MM-DD (UTC). Defaults to 7 days ago. Any date within the recorded history works; check coverage.complete_from. |
end_date | string | End date, YYYY-MM-DD (UTC), inclusive of the whole day. Defaults to today. |
limit | integer | Number of activities per page (default: 20, max: 100) |
cursor | string | Pagination cursor from the previous response; pass it with otherwise identical parameters. |
refresh | boolean | Sync this account from Meta before reading, even if it was synced in the last 15 minutes. Defaults to false. |
connection_id | string | Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs. |
ad-accounts
meta_ads_list_ad_accounts List Meta Ad Accounts
List Meta ad accounts with search, status filtering, single/multi-account lookup by ID, and pagination. Cached by default; pass refresh=true for latest data. Entities may optionally include recent activities.
| Parameter | Type | Description |
|---|---|---|
reason required | string | Why this tool call is needed |
9 optional parameters
| Parameter | Type | Description |
|---|---|---|
refresh | boolean | Force fresh data from Meta API instead of using cache. Defaults to false (cache-first). Only set to true when you need real-time data. |
cursor | string | Pagination cursor from previous response |
search | string | Search ad accounts by name (case-insensitive partial match) |
account_id | string | Filter by exact account ID (without act_ prefix) |
account_ids | array | Get multiple accounts by ID. Mutually exclusive with account_id. When provided, ignores other filters/pagination. |
status | integer | Account status code (1=Active, 2=Disabled, etc.) |
limit | integer | Number of accounts per page (default: 20, max: 100) |
include_activities | boolean | Include recent activity log (last 7 days of changes) for each entity |
connection_id | string | Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs. |
reporting
meta_ads_get_ad_creative_report Get Meta Ads Creative Performance Report
Ad-level performance report with full funnel metrics, including video funnel (ThruPlays, 25/50/75/95/100% completions, avg watch time) for video creatives. All conversion types shown individually. Supports two grouping modes: ad_name (default, aggregates ads sharing the same name with a representative ad_id for preview) and ad_id (one row per ad). The representative ad_id can be passed to meta_ads_preview_ads. Rows come back highest spend first. Creative intelligence (enable with meta_ads_enable_creative_intelligence): each row carries a compact profile block for its ad (format, hook_type, hook_text, archetype, promise_type, visual_style, pacing in cuts per 10 s, has_voiceover, has_captions, has_person_on_screen, cta_text_on_screen, duration_s, aspect_ratio), null while the ad is not analyzed yet; pass group_by (e.g. hook_type, format) to get one row per attribute value with the funnel metrics summed across its ads (ad_count, representative ad_id; level is ignored), which answers "which hooks or formats win" in one call. Ads with no profile share the null row. For an account without creative intelligence the response carries a warning naming the enable tool. For one ad's full breakdown (storyboard, transcript, frames), use meta_ads_get_creative_analysis. Rows are compact by default: they leave out the per-type cost arrays (cost_per_action_type, cost_per_conversion, cost_per_thruplay), each of which is spend divided by that type's count. Pass full_detail: true to include them. Pass action_types to restrict the actions/action_values/conversions arrays to those types only (e.g. purchase, which also matches offsite_conversion.fb_pixel_purchase), which shrinks rows and lets more fit per page; a type that matches nothing leaves the arrays whole and adds a warning. Every metric is always returned, so there is no metrics filter. Pass action_attribution_windows to get actions broken down by attribution window. Creative media (asset_type, asset_url, thumbnail_url) is listed once per ad under assets, keyed by each row's ad_id. Each response is one page of at most 50,000 characters, or limit rows if set. When more rows remain it returns nextCursor: pass it as cursor to get the next page, and repeat until nextCursor is absent to walk every row, compact or full detail. Reads up to 2,000 ad-level rows from Meta. truncated is true whenever a response does not hold every row, and truncation gives the reasons, total_rows, returned_rows, remaining_rows and remaining_spend. The reasons are response_size or limit (more pages remain), row_limit (Meta had more rows than the tool reads; no cursor reaches them, unread_spend gives their approximate spend, and ad_name totals may be low, so narrow by campaign, ad set or ad, shorten time_range, or drop time_increment or breakdowns) and report_changed (live numbers moved rows across a page boundary between calls, so rows may be missing or repeated across pages; call again without cursor for a consistent set). A call without cursor always reads the report fresh from Meta; cursor pages served by the same server instance reuse that read for up to 15 minutes, and a page served elsewhere reads Meta again (report_changed flags any rows that moved).
| Parameter | Type | Description |
|---|---|---|
account_id required | string | Meta ad account ID |
time_range required | object | Required date range {since, until} in YYYY-MM-DD |
reason required | string | Why this tool call is needed |
12 optional parameters
| Parameter | Type | Description |
|---|---|---|
level | string | Grouping level: ad_name (default, aggregate ads sharing the same name, providing a representative ad_id that can be passed to meta_ads_preview_ads) or ad_id (one row per ad) |
time_increment | object | Time grouping: 1=daily, 7=weekly, or "monthly" |
breakdowns | array | Segment by dimension. Pass multiple values for cross-tabulated rows (e.g. ["age","gender"] → one row per "35-44 / female" segment). Available: age, gender, country, region, device_platform, publisher_platform, platform_position, impression_device, dma. Note: `platform_position` is always paired with `publisher_platform` (Meta requires both; added automatically if omitted). |
filtering | array | Filters as [{field, operator, value}] |
action_types | array | Restrict the actions/action_values/cost_per_action_type/conversions/conversion_values/cost_per_conversion arrays to these action types only (e.g. ["offsite_conversion.fb_pixel_purchase"]). A short name such as "purchase" also matches types ending in ".purchase" or "_purchase" (e.g. offsite_conversion.fb_pixel_purchase, omni_purchase). If a requested type matches nothing, the arrays are returned unfiltered with a warning listing the types the report has. When omitted, every action type is returned. Reduces response size so more rows fit per page. |
metrics | array | Deprecated and ignored: every metric is always returned. This is NOT an alias for action_types; use action_types to filter actions. |
action_attribution_windows | array | Attribution windows for action/conversion metrics. When omitted, each action has a single `value` counted under its ad set's own attribution_setting, as in Ads Manager (this report does not return the setting; call meta_ads_get_insights with fields: ["attribution_setting"] to see it). Listing windows adds one key per window to each action, e.g. ["7d_click"] for 7-day click only. Available: 1d_click, 7d_click, 28d_click, 1d_view, 1d_ev, default. 7d_view and 28d_view were removed by Meta on 2026-01-12: still accepted, but Meta returns no key for them. |
full_detail | boolean | Rows are compact by default: they leave out the per-type cost arrays (cost_per_action_type, cost_per_conversion, cost_per_thruplay), each of which is spend divided by that type's count. Pass true to include them. Full-detail rows are about twice as large, so each page holds about half as many. |
group_by | string | Group by a creative profile attribute instead of by ad: one row per value (e.g. each hook_type), with the same funnel metrics summed across its ads, ad_count, and a representative ad_id; level is ignored. Ads with no profile yet (not analyzed, or creative intelligence not enabled for the account) share one row whose value is null. Answers "which hooks / formats win" in one call. Needs meta_ads_enable_creative_intelligence on the account. |
limit | integer | Maximum rows per page (max 500). A page also ends when the response reaches its size limit. |
cursor | string | nextCursor from the previous response, to get the next page of rows |
connection_id | string | Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs. |
meta_ads_get_performance_report Get Meta Ads Performance Report
Full impression-to-conversion funnel report with delivery, engagement, actions, conversions, ROAS, and quality rankings. Supports breakdowns by device (impression_device), demographics (age, gender), geography (country, region, dma), and platform (device_platform, publisher_platform, platform_position). For Sales-objective campaigns (Advantage+ sales), supports \
| Parameter | Type | Description |
|---|---|---|
account_id required | string | Meta ad account ID |
time_range required | object | Required date range {since, until} in YYYY-MM-DD |
reason required | string | Why this tool call is needed |
8 optional parameters
| Parameter | Type | Description |
|---|---|---|
time_increment | object | Time grouping: 1=daily, 7=weekly, or "monthly" |
level | string | Aggregation level (default: account): account, campaign, adset, ad |
breakdowns | array | Dimensions to segment data by. Pass multiple values in a single call to get cross-tabulated rows (e.g. ["age","gender"] → one row per "35-44 / female" segment). Do NOT make separate calls for each dimension. Available: age, gender, country, region, device_platform, publisher_platform, platform_position, impression_device, dma, user_segment_key. Note: `platform_position` is always paired with `publisher_platform` (Meta requires both; added automatically if omitted). Note: `user_segment_key` is Meta's "Audience Segments" breakdown for Sales-objective campaigns (Advantage+ sales; the legacy Advantage+ Shopping flow was retired in v24). Returned values: prospecting, engaged, existing, unknown (lowercase); everything is `unknown` when the ad account has no audience segments defined. Cross-tabulation with demographic breakdowns like age is rejected by Meta's API — combine with country if needed; use separate calls for demographic splits. |
filtering | array | Filters as [{field, operator, value}] |
action_attribution_windows | array | Attribution windows for action/conversion metrics. When omitted, each action has a single `value` counted under its ad set's own attribution_setting, as in Ads Manager (this report does not return the setting; call meta_ads_get_insights with fields: ["attribution_setting"] to see it). Listing windows adds one key per window to each action, e.g. ["7d_click"] for 7-day click only. Available: 1d_click, 7d_click, 28d_click, 1d_view, 1d_ev, default. 7d_view and 28d_view were removed by Meta on 2026-01-12: still accepted, but Meta returns no key for them. |
limit | integer | Maximum number of rows per page (default: 100, max: 500) |
cursor | string | Pagination cursor from previous response |
connection_id | string | Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs. |
search-ad-library
meta_ads_search_ad_library Search Meta Ad Library
Search the Meta Ad Library for ads from any advertiser. Returns real creative content — ad copy (primary text, headline, description, CTA), landing URLs, run dates, platforms, and media source/mirrored URLs. Served from Hopkin's scraped ad-library corpus, results under \
| Parameter | Type | Description |
|---|---|---|
ad_reached_countries required | array | REQUIRED. ISO-3166-1 alpha-2 country codes (e.g. ["US", "GB"] — use "GB" not "UK") or ["ALL"]. Warning: ["ALL"] may return very large result sets — use with small limit values. |
reason required | string | Why this tool call is needed |
14 optional parameters
| Parameter | Type | Description |
|---|---|---|
search_terms | string | Keywords to search for in ad content. Spaces act as AND. Use the language the ad is written in. |
search_type | string | Search mode: KEYWORD_UNORDERED (default, any order) or KEYWORD_EXACT_PHRASE |
search_page_ids | array | Filter by up to 10 Facebook Page IDs. Use this for competitor/brand lookups. |
ad_type | string | Filter by ad category. Default: ALL |
ad_active_status | string | Filter by delivery status. Default: ACTIVE |
ad_delivery_date_min | string | Minimum delivery date (YYYY-MM-DD) |
ad_delivery_date_max | string | Maximum delivery date (YYYY-MM-DD) |
media_type | string | Filter by media type |
publisher_platforms | array | Filter by platform(s) |
languages | array | Filter by language (ISO 639-1 codes) |
limit | integer | Results per page (default: 25, max: 50). Note: 200 calls/hour rate limit — use larger pages to conserve quota. |
cursor | string | Pagination cursor from previous response |
include_raw | boolean | Also return raw_data, the scraped Meta Ad Library payload behind the normalized fields. Off by default. A carousel or dynamic (dco, dpa) ad's real copy is per card: its normalized headline and primary_text hold only the ad-level copy, often a catalog template such as '{{product.name}}'. Such ads carry `cards`, one per card in order, with its title, body, link_url, cta_text (plus caption and link_description when present) and an image and/or video link: our mirror, or the card's own Meta CDN URL marked short_lived (it expires) when not mirrored yet. include_raw adds only the full scraped payload behind them. Raw rows are large (~9.7 KB per ad on average and up to 268 KB), so pass a small `limit` (e.g. 3-5) when setting this. |
connection_id | string | Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs. |
ads
meta_ads_preview_ads Preview Meta AdsMCP App
Interactive UI for displaying Meta ad previews with creative content and metrics
| Parameter | Type | Description |
|---|---|---|
account_id required | string | The ad account ID |
ads required | array | Ads to preview (1-20) |
reason required | string | Why this tool call is needed |
1 optional parameter
| Parameter | Type | Description |
|---|---|---|
metric_labels | object | Display labels for metric keys |
meta_ads_list_ads List Meta Ads
List ads for a Meta ad account with ad set filtering, status, name search, single/multi-ad lookup by ID, and pagination. Each ad includes a Landing URL when available (extracted from object_story_spec, link_url, or asset_feed_spec depending on ad format) and a URL Tags line exposing the ad's tracking-template string — the URL parameters (UTMs / custom click-tracking) Meta appends to the destination URL at click time, with {{macro}} placeholders preserved verbatim. The URL tags are the creative's url_tags (the Ads Manager "URL parameters"; the Ad node itself has no url_tags field), falling back to the creative's template specs (template_data, template_url_spec query_template) when it is empty. A "Landing Page URLs" summary lists every unique destination URL; a "URL Tags Audit" summary lists the distinct templates in use and names every ad with a destination URL but no tracking template — use these to audit UTM coverage across an account without reading every ad. When Meta answers the listing but not its URL tags, the affected ads carry creative_url_tags_unavailable: true and the response a url_tags_unavailable { count, hint }: their tracking is unknown, not missing, so call again with refresh: true before reporting them as untracked. Each ad also carries an identity block (when Meta exposes it): the post it runs as (effective_object_story_id, object_story_id) with a Facebook post_permalink built from it, the Instagram post's instagram_permalink_url, the Facebook page_id and Instagram instagram_user_id it runs from (the creator's on a partnership ad), and is_partnership_ad with the sponsoring brand's branded_content_sponsor_page_id / branded_content_sponsor_instagram_id when Meta marks the ad as branded content. Use it to link to each ad's post and to tell branded ads from partnership / creator-page ads (compare page_id to the brand's Page). Page names are not included. Ads cached before these fields existed have no identity block until re-fetched: pass refresh: true. Set include_assets=true to include resolved creative media URLs (adds latency for cache misses). Entities may optionally include recent activities, and optionally automated rules (set include_rules=true to see which rules affect each ad).
| Parameter | Type | Description |
|---|---|---|
account_id required | string | The ad account ID (with or without act_ prefix) |
reason required | string | Why this tool call is needed |
13 optional parameters
| Parameter | Type | Description |
|---|---|---|
ad_id | string | Get a specific ad by ID. When provided, returns only that ad and ignores other filters/pagination. |
ad_ids | array | Get multiple ads by ID. Mutually exclusive with ad_id. When provided, ignores other filters/pagination. |
adset_id | string | Filter by ad set ID |
search | string | Search ads by name (case-insensitive partial match) |
status | array | Filter by configured ad status (user-set): ACTIVE, PAUSED, DELETED, ARCHIVED |
effective_status | array | Filter by Meta-computed serving status: ACTIVE, PAUSED, DELETED, ARCHIVED, IN_PROCESS, WITH_ISSUES, CAMPAIGN_PAUSED, ADSET_PAUSED, DISAPPROVED, PENDING_REVIEW, PENDING_BILLING_INFO, PREAPPROVED |
limit | integer | Number of ads per page (default: 20, max: 100) |
cursor | string | Pagination cursor from previous response |
refresh | boolean | Force fresh data from Meta API instead of using cache. Defaults to false (cache-first). Only set to true when you need real-time data. |
include_activities | boolean | Include recent activity log (last 7 days of changes) for each entity |
include_assets | boolean | Include resolved creative asset URLs (asset_url, thumbnail_url, asset_type) for each ad. Uses cached GCS URLs when available. |
include_rules | boolean | Include automated rules (from adrules_library) that affect each entity |
connection_id | string | Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs. |
adsets
meta_ads_list_adsets List Meta Ad Sets
List ad sets for a Meta ad account with campaign filtering, status, name search, single/multi-adset lookup by ID, and pagination. Entities may optionally include recent activities, and optionally automated rules (set include_rules=true to see which rules affect each ad set).
| Parameter | Type | Description |
|---|---|---|
account_id required | string | The ad account ID (with or without act_ prefix) |
reason required | string | Why this tool call is needed |
12 optional parameters
| Parameter | Type | Description |
|---|---|---|
adset_id | string | Get a specific ad set by ID. When provided, returns only that ad set and ignores other filters/pagination. |
adset_ids | array | Get multiple ad sets by ID. Mutually exclusive with adset_id. When provided, ignores other filters/pagination. |
campaign_id | string | Filter by campaign ID |
search | string | Search ad sets by name (case-insensitive partial match) |
status | array | Filter by configured ad-set status (user-set): ACTIVE, PAUSED, DELETED, ARCHIVED |
effective_status | array | Filter by Meta-computed serving status: ACTIVE, PAUSED, DELETED, ARCHIVED, IN_PROCESS, WITH_ISSUES, CAMPAIGN_PAUSED |
limit | integer | Number of ad sets per page (default: 20, max: 100) |
cursor | string | Pagination cursor from previous response |
refresh | boolean | Force fresh data from Meta API instead of using cache. Defaults to false (cache-first). Only set to true when you need real-time data. |
include_activities | boolean | Include recent activity log (last 7 days of changes) for each entity |
include_rules | boolean | Include automated rules (from adrules_library) that affect each entity |
connection_id | string | Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs. |
auth
meta_ads_check_auth_status Check Meta Ads Authentication Status
Troubleshoot authentication issues and get user profile info. Only use this tool when another tool fails with a permission or authentication error — do NOT call proactively.
| Parameter | Type | Description |
|---|---|---|
reason required | string | Why this tool call is needed |
1 optional parameter
| Parameter | Type | Description |
|---|---|---|
connection_id | string | Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs. |
meta_ads_ping Ping Meta Ads MCP Server
Health check for the Meta Ads MCP server.
| Parameter | Type | Description |
|---|---|---|
reason required | string | Why this tool call is needed |
1 optional parameter
| Parameter | Type | Description |
|---|---|---|
message | string | Optional message to echo back |
billing-status
meta_ads_get_billing_status Billing status
Why a call was refused with a billing error (402) and how to get unblocked. Reports whether this organization is entitled, its subscription status, tier, trial end, credits used and left this period, the price table and a link to the billing page. With checkout_tier, the organization owner also gets a Stripe Checkout link for that plan; a member gets the owner's contact and a message to forward. Call it after any 402. While waiting for a human to pay, poll it every 10 seconds for the first minute, every 30 seconds until 5 minutes, then every 60 seconds until 15 minutes, then stop and tell the human. Once it returns entitled: true, retry the blocked call; if the retry still returns 402, wait 15 seconds and retry once. A Checkout link is a payment link: give it to the organization owner only.
| Parameter | Type | Description |
|---|---|---|
reason required | string | Why this tool call is needed |
1 optional parameter
| Parameter | Type | Description |
|---|---|---|
checkout_tier | string | Organization owner only: also create a Stripe Checkout link for this plan. A member gets the owner's contact and a message to forward instead. |
campaigns
meta_ads_list_campaigns List Meta Ad Campaigns
List campaigns for a Meta ad account with status filtering, name search, single/multi-campaign lookup by ID, and pagination. Entities may optionally include recent activities, and optionally automated rules (set include_rules=true to see which rules affect each campaign).
| Parameter | Type | Description |
|---|---|---|
account_id required | string | The ad account ID (with or without act_ prefix) |
reason required | string | Why this tool call is needed |
11 optional parameters
| Parameter | Type | Description |
|---|---|---|
status | array | Filter by configured campaign status (user-set): ACTIVE, PAUSED, DELETED, ARCHIVED |
effective_status | array | Filter by Meta-computed serving status: ACTIVE, PAUSED, DELETED, ARCHIVED, IN_PROCESS, WITH_ISSUES |
limit | integer | Number of campaigns per page (default: 20, max: 100) |
cursor | string | Pagination cursor from previous response |
refresh | boolean | Force fresh data from Meta API instead of using cache. Defaults to false (cache-first). Only set to true when you need real-time data. |
campaign_id | string | Get a specific campaign by ID. When provided, returns only that campaign and ignores other filters/pagination. |
campaign_ids | array | Get multiple campaigns by ID. Mutually exclusive with campaign_id. When provided, ignores other filters/pagination. |
search | string | Search campaigns by name (case-insensitive partial match) |
include_activities | boolean | Include recent activity log (last 7 days of changes) for each entity |
include_rules | boolean | Include automated rules (from adrules_library) that affect each entity |
connection_id | string | Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs. |
chart
meta_ads_render_chart Render ChartMCP App
Interactive UI for rendering data visualizations (bar, scatter, timeseries, funnel, waterfall, choropleth)
bar scatter timeseries funnel waterfall choropleth| Parameter | Type | Description |
|---|---|---|
reason required | string | Brief explanation of why you are rendering this chart |
chart required | object | Chart configuration. Supported types: bar, scatter, timeseries, funnel, waterfall, choropleth. |
competitor-ads
meta_ads_list_competitor_ads List Competitor Ads
List a competitor's ads from the scraped Meta Ad Library corpus — real creative content (copy, CTA, landing URL, media metadata), not just snapshot links. Filter by active_only (still running), display_format (image, video, carousel, text), first_seen_since / first_seen_until (when the ad first appeared — the platform's start date, else when Hopkin first scraped it; use these for "new ads" and read count), since (last seen by a scrape on/after a date, so long-running ads match too), and search (full-text over ad copy). Requires no Meta connection — the corpus is maintained by Hopkin's daily scrape of tracked advertisers. Get advertiser IDs from meta_ads_list_tracked_competitors or meta_ads_track_competitor. Each ad leaves out raw_data, the raw scraped payload behind these fields, unless include_raw is set. ${META_CARDS_NOTE} raw_data is large, so pair include_raw with a small limit.
| Parameter | Type | Description |
|---|---|---|
advertiser_id required | string | The advertiser ID from meta_ads_list_tracked_competitors or meta_ads_track_competitor |
reason required | string | Why this tool call is needed |
9 optional parameters
| Parameter | Type | Description |
|---|---|---|
active_only | boolean | Only ads still running (no stopped_running_at) |
display_format | string | Filter by creative format as Meta labels it (case-insensitive). Observed values: image, video, carousel, multi_images, dco, dpa. dco and dpa are Meta's dynamic formats (dynamic creative and catalog/advantage+ ads) and are the most common in the corpus. |
since | string | Only ads a scrape last saw on or after this ISO date/timestamp (e.g. 2026-07-01) — compares last_seen_at, so an ad running for months still matches. For ads that are NEW, use first_seen_since. |
first_seen_since | string | Only ads that first appeared on or after this ISO date/timestamp (e.g. 2026-10-05). "First appeared" is the platform's own start date (started_running_at) when the ad has one, else first_seen_at — when Hopkin first scraped it, so a newly tracked advertiser's older ads can count as new. For "new ads in the last 7 days", pass the date 7 days ago with limit: 1 and read count. |
first_seen_until | string | Only ads that first appeared on or before this ISO date/timestamp — same clock as first_seen_since. A date alone (e.g. 2026-10-11) includes that whole UTC day. |
search | string | Case-insensitive search over ad copy (primary text, headline, description), up to 100 characters |
limit | integer | Number of ads per page (default: 20, max: 100) |
cursor | string | Pagination cursor from previous response |
include_raw | boolean | Also return raw_data, the scraped Meta Ad Library payload behind the normalized fields. Off by default. A carousel or dynamic (dco, dpa) ad's real copy is per card: its normalized headline and primary_text hold only the ad-level copy, often a catalog template such as '{{product.name}}'. Such ads carry `cards`, one per card in order, with its title, body, link_url, cta_text (plus caption and link_description when present) and an image and/or video link: our mirror, or the card's own Meta CDN URL marked short_lived (it expires) when not mirrored yet. include_raw adds only the full scraped payload behind them. Raw rows are large (~9.7 KB per ad on average and up to 268 KB), so pass a small `limit` (e.g. 3-5) when setting this. |
competitor-ad
meta_ads_get_competitor_ad Get Competitor Ad
Fetch one competitor ad in full detail from the scraped corpus: complete copy (headline, primary text, description, CTA), landing URL, run dates, and every media asset with its permanent CDN \
| Parameter | Type | Description |
|---|---|---|
ad_id required | string | The library ad ID from meta_ads_list_competitor_ads |
reason required | string | Why this tool call is needed |
5 optional parameters
| Parameter | Type | Description |
|---|---|---|
include_frames | boolean | Optional, no effect: frame URLs are always listed. Use stride/start/end to choose which frames. |
stride | integer | List every Nth extracted frame. Defaults to a stride that fits each video into its share of 120 frame URLs per ad (split evenly between the ad's videos). |
start | number | Only frames at or after this offset into the video, in seconds |
end | number | Only frames at or before this offset into the video, in seconds |
include_raw | boolean | Also return raw_data, the scraped Meta Ad Library payload behind the normalized fields. Off by default. A carousel or dynamic (dco, dpa) ad's real copy is per card: its normalized headline and primary_text hold only the ad-level copy, often a catalog template such as '{{product.name}}'. Such ads carry `cards`, one per card in order, with its title, body, link_url, cta_text (plus caption and link_description when present) and an image and/or video link: our mirror, or the card's own Meta CDN URL marked short_lived (it expires) when not mirrored yet. include_raw adds only the full scraped payload behind them. A raw row is large (~9.7 KB per ad on average and up to 268 KB). |
track-competitor
meta_ads_track_competitor Track Competitor
Register a Meta advertiser for daily ad-library tracking. Provide exactly one identifier: page_id (numeric Facebook Page ID — most precise; works even for a page never scraped), page_url (a facebook.com page URL; numeric IDs resolve directly, a vanity handle is matched by page handle or read as a name), or name (the advertiser's name as it appears on its Facebook page, e.g. "Jones Road Beauty"). Call this directly with the name — do not search the ad library first: a name or handle not yet in the corpus is looked up live in Meta's Ad Library (a keyword search, about 20–60 s) and tracked in this same call if exactly one advertiser has that exact name. Several matches return a candidate list (name, platform_advertiser_id — the page ID — and ad count) and track NOTHING — retry with page_id set to a candidate's platform_advertiser_id; no exact match returns an error (nothing tracked) asking for the page ID — that is not proof the advertiser has no ads, since the keyword search can miss one. A new track starts a full background scrape (full_scrape: "started"); the response reports seeded (ads landed by the lookup), full_scrape and any warning. The daily sweep keeps the advertiser's ads current for meta_ads_list_competitor_ads. Requires no Meta connection.
| Parameter | Type | Description |
|---|---|---|
reason required | string | Why this tool call is needed |
3 optional parameters
| Parameter | Type | Description |
|---|---|---|
page_id | string | Numeric Facebook Page ID of the advertiser (most precise identifier). A non-numeric value is treated as a handle/name search, like name. |
page_url | string | Facebook Page URL, e.g. https://www.facebook.com/nike, https://www.facebook.com/profile.php?id=15087023444, or an Ad Library URL with view_all_page_id. Numeric IDs resolve exactly; a vanity handle is matched by page handle, or looked up live as a name when no scraped advertiser has it. |
name | string | Advertiser name as it appears on its Facebook page, e.g. "Nike". Searched among scraped advertisers, then looked up live in the Ad Library when none matches exactly. Exactly one exact match is tracked; multiple matches return candidates and track nothing. |
untrack-competitor
meta_ads_untrack_competitor Untrack Competitor
Stop tracking a Meta advertiser. Removes only your tracking registration — the shared ad corpus is untouched, and untracking an advertiser that was never tracked succeeds with removed: false. Get advertiser IDs from meta_ads_list_tracked_competitors.
| Parameter | Type | Description |
|---|---|---|
advertiser_id required | string | The advertiser ID from meta_ads_list_tracked_competitors |
reason required | string | Why this tool call is needed |
tracked-competitors
meta_ads_list_tracked_competitors List Tracked Competitors
List the Meta advertisers you are tracking: advertiser name, page ID, when tracking started, last scrape time and status, and the ad count in the corpus for each. Scrape health is flagged per row — advertisers with no successful scrape in the last 48 hours are marked stale, and a non-ok scrape status (blocked, schema_error, empty) carries an explicit scrape_warning; treat flagged rows' corpus data as possibly out of date. Use the returned advertiser IDs with meta_ads_list_competitor_ads to browse their ads. Requires no Meta connection.
| Parameter | Type | Description |
|---|---|---|
reason required | string | Why this tool call is needed |
2 optional parameters
| Parameter | Type | Description |
|---|---|---|
limit | integer | Number of tracked competitors per page (default: 20, max: 100) |
cursor | string | Pagination cursor from previous response |
connections
meta_ads_list_connections List Meta Connections
List the Meta Ads connections available to you — both ones you own and ones shared with you via an organization. Use this to discover connection IDs for set_default / share / rename / revoke.
| Parameter | Type | Description |
|---|---|---|
reason required | string | Why this tool call is needed |
set-default-connection
meta_ads_set_default_connection Set Default Meta Connection
Set the Meta connection that should be used by default for subsequent Meta Ads tool calls. The default is scoped to the calling actor (your user account, or the API key being used).
| Parameter | Type | Description |
|---|---|---|
connection_id required | string | UUID of the connection to mark as the actor's default Meta connection. |
reason required | string | Why this tool call is needed |
share-connection
unshare-connection
rename-connection
meta_ads_rename_connection Rename Meta Connection
Rename the display name of an owned Meta connection. The OAuth grant and underlying account are unaffected — this only changes the human-readable label. You must be the owner.
| Parameter | Type | Description |
|---|---|---|
connection_id required | string | UUID of the connection to rename. You must be the owner. |
display_name required | string | New human-readable name for the connection. |
reason required | string | Why this tool call is needed |
revoke-connection
meta_ads_revoke_connection Revoke Meta Connection
Revoke (soft-delete) an owned Meta connection. Any defaults pointing to it are invalidated and shared org members lose access. The OAuth grant at Meta is NOT revoked by this tool — the user must disconnect via the dashboard if they want to fully revoke at Meta. You must be the owner.
| Parameter | Type | Description |
|---|---|---|
connection_id required | string | UUID of the connection to revoke. You must be the owner. |
reason required | string | Why this tool call is needed |
enable-creative-intelligence
meta_ads_enable_creative_intelligence Enable Meta Creative Intelligence
Turn creative intelligence on or off for a Meta ad account, or list the accounts that have it. With it on, Hopkin sweeps the account daily: every ad that spent in the last 90 days has its media mirrored, its video frames and audio extracted and its creative profiled (hook, format, pacing…), so creative questions answer in one call. Pass ad_account_id with enabled: true to enroll (starts the first sweep at once; sweep.status says whether it started) or enabled: false to stop the daily sweep (creatives already analyzed are kept). Pass neither to list the enrolled accounts on this connection under data, with last sweep status and creative counts (analyzed / processing / no_source / failed; no_source is a video whose file Meta would not hand over). Enabling is free; each newly analyzed creative costs 5 credits, charged as it is analyzed. Enrollment belongs to the connection: teammates sharing it see and can change it. Enabling needs the connection to reach the account (see meta_ads_list_ad_accounts).
| Parameter | Type | Description |
|---|---|---|
reason required | string | Why this tool call is needed |
3 optional parameters
| Parameter | Type | Description |
|---|---|---|
ad_account_id | string | Meta ad account to turn creative intelligence on or off, e.g. "act_123456789". Pass with enabled. Omit both to list the enrolled accounts. |
enabled | boolean | true enrolls the account and starts its first sweep; false stops the daily sweep (creatives already analyzed are kept). Pass with ad_account_id. |
connection_id | string | Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs. |
creative-analysis
meta_ads_get_creative_analysis Get Meta Creative Analysis
Break down one of your own Meta ads in one call: its creative profile (format, hook_type, hook_text, archetype, promise_type, visual_style, pacing in cuts per 10 s, has_voiceover, has_captions, has_person_on_screen, cta_text_on_screen, duration_s, aspect_ratio), the storyboard (8-section narrative), and for a video the transcript, audio analysis and audio track, plus frames as cdn.hopkin.ai URLs (2 fps; frame N sits at N / 2 s). At most 120 frame URLs per ad; pass stride or a start/end window in seconds to list others. Media is served by URL, never inline. Needs creative intelligence on the ad's account (meta_ads_enable_creative_intelligence). An ad that is not analyzed is not an error: status says why — not_enrolled (no analysis linked on this connection: enable the account, or the ad has not spent in the lookback window yet), processing (linked, analysis still running), no_source (Meta would not hand over the video file; only its thumbnail is kept), failed (the media could not be mirrored or its frames extracted) — and message says what to do. To compare creatives across the account (which hooks win), use meta_ads_get_ad_creative_report with group_by instead.
| Parameter | Type | Description |
|---|---|---|
ad_id required | string | The Meta ad to break down, e.g. "120210000000001" (from meta_ads_list_ads or a creative report row). |
reason required | string | Why this tool call is needed |
4 optional parameters
| Parameter | Type | Description |
|---|---|---|
stride | integer | List every Nth extracted frame. Defaults to a stride that fits each video into its share of 120 frame URLs per ad (split evenly between the ad's videos). |
start | number | Only frames at or after this offset into the video, in seconds |
end | number | Only frames at or before this offset into the video, in seconds |
connection_id | string | Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs. |
custom-conversions
meta_ads_list_custom_conversions List Meta Custom Conversions
List custom conversion definitions for a Meta ad account, including ID, name, custom_event_type, event_source_id, rule JSON, retention_days, default_conversion_value, and description. Use this to inspect tracking setup and understand URL/event matching rules behind conversions such as offsite_conversion.fb_pixel_custom.*.
| Parameter | Type | Description |
|---|---|---|
account_id required | string | The ad account ID (with or without act_ prefix) |
reason required | string | Why this tool call is needed |
3 optional parameters
| Parameter | Type | Description |
|---|---|---|
limit | integer | Custom conversions per page (default: 100, max: 100) |
cursor | string | Pagination cursor from previous response |
connection_id | string | Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs. |
delivery-estimate
meta_ads_get_delivery_estimate Get Meta Delivery Estimate (Audience Size)
Estimated audience size from Meta's delivery estimate: the range of monthly active people (audience_size.lower_bound / upper_bound) a targeting setup can reach. Use it to answer "how big is this audience?" before building an ad set, or "how big are my ad sets' audiences?" for existing ones. Two modes: - Account (no adset_ids): sizes a hypothetical audience. optimization_goal and targeting_spec are required; promoted_object is optional (pass it for conversion goals, e.g. {"pixel_id":"…","custom_event_type":"PURCHASE"}). Returns one row. - Ad sets (adset_ids, 1-25, all in account_id): one row per ad set with its name, campaign and effective optimization_goal, sized on its own settings. optimization_goal / targeting_spec / promoted_object, when given, override every ad set's own (a what-if). An ad set from another account fails the call; one ad set Meta cannot estimate gets a row error and the others still return. This is audience size, not a results forecast: Meta deprecated the daily results forecast and daily active people on this endpoint, and the size barely changes with optimization_goal. Never present it as predicted conversions, clicks or reach per day. When estimate_ready is false, say the estimate is provisional. targeting_optimization shows which expansions Meta applies (detailed_targeting, lookalike). Always live, never cached.
| Parameter | Type | Description |
|---|---|---|
account_id required | string | The ad account ID (with or without act_ prefix). Every ad set in adset_ids must belong to it. |
reason required | string | Why this tool call is needed |
5 optional parameters
| Parameter | Type | Description |
|---|---|---|
adset_ids | array | Ad sets to size (1-25), one row each, using each ad set's own goal, targeting and promoted object unless overridden below. Omit to size a hypothetical audience at the account level, which then requires optimization_goal and targeting_spec. |
optimization_goal | string | Optimization goal. Required without adset_ids; with adset_ids it overrides every ad set's own goal. |
targeting_spec | object | Meta targeting spec, passed through unchanged, e.g. {"geo_locations":{"countries":["US"]},"age_min":25,"age_max":44,"flexible_spec":[{"interests":[{"id":"6003139266461"}]}]}. Required without adset_ids; with adset_ids it replaces every ad set's own targeting. |
promoted_object | object | Meta promoted object, passed through unchanged, e.g. {"pixel_id":"123","custom_event_type":"PURCHASE"} for OFFSITE_CONVERSIONS. Optional; goals like REACH and LINK_CLICKS work without it. With adset_ids it replaces every ad set's own promoted object. |
connection_id | string | Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs. |
feedback
meta_ads_developer_feedback Submit Developer Feedback
Submit feedback about missing tools, improvements, bugs, or workflow gaps in the MCP toolset. Not for user-facing issues like auth or API errors.
| Parameter | Type | Description |
|---|---|---|
feedback_type required | string | Feedback category: new_tool (request new capability), improvement (enhance existing tool), bug (report issue), workflow_gap (missing workflow) |
title required | string | Concise title summarizing the feedback |
description required | string | What is needed and why |
reason required | string | Why this tool call is needed |
3 optional parameters
| Parameter | Type | Description |
|---|---|---|
current_workaround | string | Current workaround, if any |
priority | string | Impact level: low (nice-to-have), medium (improves workflow), high (blocking issue) |
interface | string | Interface the feedback originated from: MCP (default) or CLI |
insights
meta_ads_get_insights Get Meta Ads Insights
Retrieve performance metrics from Meta Ads with date presets/custom ranges, time grouping, entity-level aggregation, dimensional breakdowns, and filtering. Always fetches fresh data. Provide date_preset or time_range. For standard full-funnel analysis, prefer meta_ads_get_performance_report; use this for custom fields, hourly/creative-asset breakdowns, video metrics, or the \
| Parameter | Type | Description |
|---|---|---|
account_id required | string | Meta ad account ID |
reason required | string | Why this tool call is needed |
12 optional parameters
| Parameter | Type | Description |
|---|---|---|
date_preset | string | Predefined date range: today, yesterday, last_3d, last_7d, last_14d, last_28d, last_30d, last_90d, this_month, last_month, this_quarter, last_quarter, this_year, last_year, lifetime, maximum |
time_range | object | Custom date range {since, until} in YYYY-MM-DD |
time_increment | object | Time grouping: 1=daily, 7=weekly, or "monthly" |
level | string | Aggregation level: account, campaign, adset, ad |
fields | array | Metrics to retrieve (defaults to standard set) |
breakdowns | array | Dimensions to segment data by. Pass multiple values in a single call to get cross-tabulated rows (e.g. ["age","gender"] → one row per "35-44 / female" segment). Do NOT make separate calls for each dimension. Available: age, gender, country, region, dma, device_platform, publisher_platform, platform_position, impression_device, frequency_value, place_page_id, product_id, ad_format_asset, body_asset, call_to_action_asset, description_asset, image_asset, link_url_asset, title_asset, video_asset, user_segment_key. Note: `platform_position` is always paired with `publisher_platform` (Meta requires both; added automatically if omitted). Note: `frequency_value` is compatible only with `fields: ["reach"]` and cannot be combined with other breakdowns or with action_breakdowns; the tool rejects incompatible calls. Note: `user_segment_key` is Meta's "Audience Segments" breakdown for Sales-objective campaigns (Advantage+ sales; the legacy Advantage+ Shopping flow was retired in v24). Returned values: prospecting, engaged, existing, unknown (lowercase); everything is `unknown` when the ad account has no audience segments defined. Cross-tabulation with demographic breakdowns like age is rejected by Meta's API — combine with country if needed; use separate calls for demographic splits. |
action_breakdowns | array | Action breakdown dimensions: action_type, action_target_id, action_destination, action_reaction, action_video_sound, action_video_type, action_carousel_card_id, action_carousel_card_name |
filtering | array | Filters as [{field, operator, value}] |
action_attribution_windows | array | Attribution windows for action/conversion metrics. When omitted, each action has a single `value` counted under its ad set's own attribution_setting, as in Ads Manager (add `attribution_setting` to fields to see it). Listing windows adds one key per window to each action, e.g. ["7d_click"] for 7-day click only. Available: 1d_click, 7d_click, 28d_click, 1d_view, 1d_ev, default. 7d_view and 28d_view were removed by Meta on 2026-01-12: still accepted, but Meta returns no key for them. |
limit | integer | Maximum number of rows per page (default: 100, max: 500) |
cursor | string | Pagination cursor from previous response |
connection_id | string | Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs. |
pixel-health
meta_ads_get_pixel_health Get Meta Pixel Health
Comprehensive pixel health check: metadata, CAPI connection status, event volume stats, automatic matching config, diagnostic checks, and per-event event match quality (EMQ) from Meta's Dataset Quality API. Use this to diagnose tracking issues before analyzing ad performance — low ROAS could be a tracking problem, not a campaign problem. dataset_quality (per pixel): one row per web event, ranked lowest composite_score first (0-10; ties: most spend first). Fields Meta omits mean "not computed", not zero. Web events only — app, offline and CRM events are not covered; Meta uses its own recent windows, so days_back does not apply to it. Without pixel_id (detail "compact"), limit/cursor page pixels and each pixel shows its 10 lowest-scoring events as compact rows: composite_score, match_key_coverage (identifier → coverage %, lowest first), diagnostic names, event_coverage_percentage (CAPI vs pixel), event_spend and ad_set_count; dataset_quality.count has the total and dataset_quality.message names the pixel_id to call for more. With pixel_id (detail "full"), each event carries Meta's own blocks and descriptions — event_match_quality (composite_score, match_key_feedback, diagnostics with a solution), event_coverage, dedupe_key_feedback, data_freshness, acr (extra conversions CAPI reports), value_diagnostics, event_delay, event_spend, and the ad sets optimizing or targeting on the event (ad_set_count + top 3 by spend; include_adsets=true for all) — and limit/cursor page that pixel's events (default 10, max 20): pass the top-level nextCursor back to get the next events. To explain why an event scores low, call with its pixel_id. When dataset_quality.status is "permission_denied" or "error", surface dataset_quality.message (upstream_status/upstream_code say what Meta answered), treat match quality as unavailable rather than poor, and keep the rest of the audit. match_rate_approx is a legacy fallback: prefer dataset_quality, and read -1 as "Meta has no estimate". capi.connected is true when an active CAPI Gateway config exists or server events were observed in the lookback window (capi.server_event_count), false when both signals were readable and showed neither, and "unknown" when the signals could not be read — NEVER report CAPI as disconnected when it is "unknown"; tell the user to verify in Meta Events Manager instead. When event_stats_status is "permission_denied", surface event_stats_message to the user — the rest of the pixel health audit is still valid.
| Parameter | Type | Description |
|---|---|---|
account_id required | string | The ad account ID (with or without act_ prefix) |
reason required | string | Why this tool call is needed |
7 optional parameters
| Parameter | Type | Description |
|---|---|---|
pixel_id | string | Specific pixel ID to check. If omitted, checks all pixels on the account. |
event_names | array | Filter event stats to these event names (e.g. ["Purchase", "Lead"]) |
days_back | integer | Number of days of event stats to include (default: 28, max: 90) |
limit | integer | Page size (max 20). Without pixel_id: pixels per page (default 5). With pixel_id: that pixel's dataset_quality events per page (default 10). |
cursor | string | Pagination cursor from the previous response's nextCursor. Pages pixels without pixel_id, dataset_quality events with it. |
include_adsets | boolean | With pixel_id only: return every ad set using each dataset_quality event (up to 100 per event) instead of the top 3 by spend (default false). Without pixel_id, events are compact rows with ad_set_count only. |
connection_id | string | Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs. |
reach-forecast
meta_ads_get_reach_forecast Get Meta Reach Forecast
Forecast reach, frequency and audience saturation for a Meta budget, using Meta's reach & frequency predictions. Answers "how much more can we spend before we saturate?", "what reach and frequency does $X buy between these dates?", "what does it cost to reach N people?" and "which audience saturates first?" (up to 4 scenarios side by side, each with exactly one of adset_id (its live targeting and placements), targeting (a spec) or countries (broad, FB+IG feed/story/reels)). Each scenario's data row has: audience_size; meta_estimate (Meta's budget, reach, impressions, frequency, cpm, min/max budget, max reach); ladder — spend steps (ladder_multipliers × budget, default 1, 1.5, 2, 2.5, 3.5, 5, 7.5×; budget defaults to trailing-30-day spend scaled to the window) priced at comparison_cpm (default trailing-7-day account CPM), with reach, frequency, freshness_pct (new people per extra 1,000 impressions vs the 1× step) and read: "room" / "diminishing" / "saturating"; soft_ceiling_spend — the first step whose freshness falls below soft_ceiling_freshness_pct (default 40); and a ~20-point curve. With reach instead of budget, Meta prices the reach and reach_target says what it costs at comparison_cpm. Amounts are account currency, major units. Settings used are echoed under settings. Pricing caveat: Meta prices predictions at Reach-objective CPM, and conversion-optimized delivery costs more. meta_estimate and curve are Reach-objective prices; quote the ladder (re-priced at comparison_cpm) for a conversion campaign, and say which CPM you used. Status per scenario: "ok"; "failed" with failure.code and failure.meaning (e.g. audience too small, budget too low, under a country's minimum reach) while the other scenarios still return; or "pending" — Meta was still computing after ~30s: call again with that prediction_id (no scenarios, budget, reach or dates) to read it without creating another. prediction_id also reads predictions made in Ads Manager. Side effects and reversibility: each scenario creates one reach & frequency prediction object in the ad account. It stays visible in Ads Manager and there is no delete endpoint, but no spend or inventory is committed — the tool never reserves or cancels (no action is ever sent). There is no dry_run because the prediction is itself the preview. Destinations (Page + Instagram account) come from the account's active ads, else its most recent ads, else its promotable Page and linked Instagram account; with no Instagram account, Instagram (and Threads) placements are dropped and a warning says so. Creating needs a connection granted ads_management; reading a prediction_id does not. The account must have Meta's reach & frequency capability; windows are 1-90 days, start after today and must finish within 180 days.
| Parameter | Type | Description |
|---|---|---|
account_id required | string | The ad account ID (with or without act_ prefix). |
reason required | string | Why this tool call is needed |
14 optional parameters
| Parameter | Type | Description |
|---|---|---|
scenarios | array | Audiences to forecast side by side (1-4). Each takes exactly one of adset_id, targeting or countries. Required unless prediction_id is given. |
budget | number | Budget for the whole window, in the account currency's major units (e.g. 5000 = $5,000). Default: the account's trailing-30-day spend, scaled to the window length. Excludes reach. |
reach | integer | Target reach (people). Asks Meta what it costs to reach this many instead of what a budget buys. Excludes budget. |
start_date | string | First day, YYYY-MM-DD in the account timezone. Default: tomorrow. |
end_date | string | Last day (inclusive), YYYY-MM-DD in the account timezone. Default: start_date + window_days - 1. Excludes window_days. |
window_days | integer | Length of the window in days when end_date is omitted (1-90, default 30). |
ladder_multipliers | array | Spend steps as multiples of the budget (default [1, 1.5, 2, 2.5, 3.5, 5, 7.5]). Sorted and de-duplicated; 1 is always added. |
soft_ceiling_freshness_pct | number | Freshness % below which a step is "saturating"; the first such step is the soft ceiling (default 40). |
frequency_cap | integer | Max impressions per person per frequency_period_days (default 2). |
frequency_period_days | integer | Days the frequency cap resets over (default 7). |
include_video | boolean | Allow video placements (default true). |
comparison_cpm | number | CPM (account currency, major units) the ladder is priced at. Default: the account's trailing-7-day CPM. |
prediction_id | string | Read and analyse an existing reach & frequency prediction (e.g. one made in Ads Manager or a pending one from an earlier call) instead of creating one. Excludes scenarios, budget, reach and dates. |
connection_id | string | Optional ID of a specific connection to use for this call. Omit to use the actor's default connection for this network. Call <platform>_list_connections to discover available connection IDs. |