Skip to main content
Glama

Server Details

Facebook / Meta Ads automation with AI: analyze performance, test creatives, optimize spend.

Status
Healthy
Last Tested
Transport
Streamable HTTP
URL

See and control every tool call

Log every tool call with full inputs and outputs
Control which tools are enabled per connector
Manage credentials once, use from any MCP client
Monitor uptime and get alerted when servers go down

Available Tools

43 tools
bulk_get_insightsTry in Inspector

⭐ PREMIUM FEATURE ⭐

Fetches performance insights for multiple ad accounts in parallel.

⚠️ Requires: Premium or Enterprise plan 💡 Value: Analyze performance data across all your campaigns at scale

Args: level: The aggregation level. Supported values: "account", "campaign", "adset" time_range: Time period for insights (default: "last_7d") Preset values: last_7d, last_14d, last_30d, last_90d, this_month, last_month, this_year, last_year, lifetime Or an object with "since" and "until" dates: {"since": "2025-01-01", "until": "2025-12-31"} time_breakdown: Optional time dimension to break down metrics by Supported values: "day", "week", "month" When specified, each account result includes segmented_metrics array with per-period data breakdown: Optional dimension to break down metrics by (can significantly increase response size) Demographic: age, gender, country, region, dma Platform/Device: device_platform, platform_position, publisher_platform, impression_device action_attribution_windows: Optional list of attribution windows for conversion metrics Supported values: 1d_click, 7d_click, 28d_click, 1d_view, 7d_view, 28d_view Default: ["7d_click", "1d_view"] account_ids: Array of account IDs to filter (optional). If omitted, fetches all accounts. fields: Metrics to return in compact mode. Default: ["spend"] Available: spend, impressions, clicks, reach, conversions, ctr, cpc, cpm, frequency, unique_clicks, cost_per_result Example: ["spend", "impressions", "clicks"] returns all three metrics Note: Only used when compact=true. Without compact mode, all fields are returned. use_cache: Whether to use cached data (default: true, disabled when time_breakdown is used) limit: Maximum accounts to return per request (default: 20, max: 50) offset: Number of accounts to skip for pagination (default: 0) compact: When true, returns minimal pivoted data for smaller response size (default: false) ⚡ USE THIS when querying many campaigns to avoid context overflow Returns: campaign_id, campaign_name, and _by_period for each requested field Use "fields" parameter to specify which metrics (default: spend only) Reduces response size by ~95% (from 500KB to ~5KB for 100 campaigns) campaign_name_contains: Array of strings to filter campaigns by name (case-insensitive) Only campaigns whose name contains ANY of these strings are returned Example: ["Prospecting", "Retargeting", "Retention"]

Returns: JSON response with: - summary: {total_accounts, successful, failed, cached, total_campaigns (campaign level), total_adsets (adset level), total_periods (time_breakdown), campaigns_matched, campaigns_total (when filtered)} - results: Array with per-account insights, each including segmented_metrics when time_breakdown is used - filter_applied: The campaign_name_contains filter used (if specified) - fields_included: The metrics included in compact mode response (when compact=true) - execution_time_ms, time_range, time_breakdown (if specified), breakdown (if specified), level, pagination metadata

Example Usage: # Fetch account-level insights for first 20 accounts (default) bulk_get_insights( level="account" )

# Fetch campaign-level insights for specific accounts bulk_get_insights( level="campaign", account_ids=["act_123456", "act_789012"], time_range="last_30d" ) # Fetch adset-level insights with monthly breakdown bulk_get_insights( level="adset", time_range={"since": "2025-01-01", "until": "2025-03-31"}, time_breakdown="month" ) # Fetch monthly breakdown for all accounts over a year bulk_get_insights( level="account", time_range={"since": "2025-01-01", "until": "2025-12-31"}, time_breakdown="month" ) # ⭐ RECOMMENDED for large accounts: Compact mode with campaign filtering # Use when you have 50+ campaigns and need specific metrics (e.g., spend by category) bulk_get_insights( level="campaign", account_ids=["act_459815811019316"], time_range={"since": "2025-08-01", "until": "2026-02-03"}, time_breakdown="month", campaign_name_contains=["Prospecting", "Retargeting", "Retention"], compact=true ) # Returns ~5KB instead of ~500KB, avoiding context overflow # Compact mode with multiple metrics (spend + impressions + clicks) bulk_get_insights( level="campaign", account_ids=["act_123456"], time_range="last_30d", time_breakdown="month", compact=true, fields=["spend", "impressions", "clicks"] ) # Returns: {campaign_id, campaign_name, spend_by_period, impressions_by_period, clicks_by_period} # Fetch insights broken down by age group bulk_get_insights( level="campaign", account_ids=["act_123456"], time_range="last_30d", breakdown="age" ) # Fetch insights with specific attribution windows bulk_get_insights( level="campaign", time_range="last_7d", action_attribution_windows=["1d_click", "7d_click"] ) # Force fresh data (bypass cache) bulk_get_insights( level="campaign", use_cache=false )
ParametersJSON Schema
NameRequiredDescriptionDefault
levelYesThe aggregation level. Supported values: "account", "campaign", "adset"
limitNoMaximum accounts to return per request (default: 20, max: 50)
fieldsNoMetrics to return in compact mode (default: ["spend"]). Available: spend, impressions, clicks, reach, conversions, ctr, cpc, cpm, frequency, unique_clicks, cost_per_result. Only used when compact=true.
offsetNoNumber of accounts to skip for pagination (default: 0)
compactNoWhen true, returns pivoted data (campaign_id, campaign_name, <metric>_by_period) for smaller response. Use "fields" param to specify metrics (default: spend). Use when querying many campaigns. Default: false
breakdownNoOptional breakdown dimension. Values: age, gender, country, region, dma, device_platform, platform_position, publisher_platform, impression_device. Note: Can significantly increase response size.
use_cacheNoWhether to use cached data (default: true)
time_rangeNoTime period as preset string (last_7d, last_30d, etc.) or {since, until} object
account_idsNoArray of account IDs to filter (optional)
date_presetNoAlias for time_range
time_breakdownNoOptional time dimension to break down metrics. Returns segmented_metrics per account.
campaign_name_containsNoFilter to campaigns whose name contains any of these strings (case-insensitive). Example: ["Prospecting", "Retargeting"]
action_attribution_windowsNoAttribution windows for conversion metrics. Values: 1d_click, 7d_click, 28d_click, 1d_view, 7d_view, 28d_view. Default: ["7d_click", "1d_view"]
bulk_update_adsTry in Inspector

⭐ PREMIUM FEATURE ⭐

Update multiple ads with individual or uniform parameters. Supports both explicit ID-based updates and filter-based batch updates.

⚠️ Requires: Premium or Enterprise plan 💡 Value: Manage hundreds of ads efficiently and save hours of manual work

Limits: Default limit of 20 entities per operation for safety. Can be increased up to 200 maximum by setting the 'limit' parameter (requires user confirmation for large updates).

Args: account_id: Meta Ads account ID (format: act_XXXXXXXXX) access_token: Meta API access token (optional) dry_run: If true, returns list of entities that would be affected without making changes (default: false) limit: Maximum number of entities to update (default: 20, max: 200). Use higher values with caution and user confirmation

# Mode 1: Explicit updates (mutually exclusive with filter mode) ad_updates: List of ad update specifications (optional) [{ "ad_id": "string", "name": "string (optional)", "status": "string (optional)", "creative_id": "string (optional)", "bid_amount": "integer (optional)", "tracking_specs": "array (optional)" }] # Mode 2: Filter-based updates (mutually exclusive with ad_updates) filter: Filter criteria to select ads (optional) { "status": "string (optional)", "campaign_id": "string (optional)", "adset_id": "string (optional)", "adset_ids": "array (optional)", "name_contains": "string (optional)", "ad_ids": "array (optional)" } updates: Uniform updates to apply to all matching ads (required when using filter) { "status": "string (optional)", "name": "string (optional)", "creative_id": "string (optional)", "bid_amount": "integer (optional)", "tracking_specs": "array (optional)" }

Returns: JSON response with matched/updated/failed/skipped counts and detailed results

Example Usage: # Mode 1: Update specific ads bulk_update_ads( account_id="act_123456", ad_updates=[ {"ad_id": "345", "status": "ACTIVE"}, {"ad_id": "678", "status": "ACTIVE"} ] )

# Mode 2: Pause all ads in an ad set bulk_update_ads( account_id="act_123456", filter={"adset_id": "789", "status": "ACTIVE"}, updates={"status": "PAUSED"} ) # Swap creative across multiple ads bulk_update_ads( account_id="act_123456", filter={"campaign_id": "123", "name_contains": "Summer"}, updates={"creative_id": "999"} )
ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of entities to update in a single operation (default: 20, max: 200). Increase with caution.
filterNoFilter criteria to select ads (filter mode)
dry_runNoIf true, returns list of entities that would be affected without making changes (default: false)
updatesNoUniform updates to apply to all matching ads (filter mode)
account_idYesMeta Ads account ID (format: act_XXXXXXXXX)
ad_updatesNoList of ad update specifications (explicit mode)
access_tokenNoMeta API access token (optional - will use cached token if not provided)
bulk_update_adsetsTry in Inspector

⭐ PREMIUM FEATURE ⭐

Update multiple ad sets with individual or uniform parameters. Supports both explicit ID-based updates and filter-based batch updates.

⚠️ Requires: Premium or Enterprise plan 💡 Value: Efficiently manage ad set configurations and budgets at scale

Limits: Default limit of 20 entities per operation for safety. Can be increased up to 200 maximum by setting the 'limit' parameter (requires user confirmation for large updates).

Args: account_id: Meta Ads account ID (format: act_XXXXXXXXX) access_token: Meta API access token (optional) dry_run: If true, returns list of entities that would be affected without making changes (default: false) limit: Maximum number of entities to update (default: 20, max: 200). Use higher values with caution and user confirmation

# Mode 1: Explicit updates (mutually exclusive with filter mode) adset_updates: List of ad set update specifications (optional) [{ "adset_id": "string", "name": "string (optional)", "status": "string (optional)", "daily_budget": "integer (optional)", "lifetime_budget": "integer (optional)", "bid_amount": "integer (optional)", "bid_strategy": "string (optional)", "optimization_goal": "string (optional)", "targeting": "object (optional)", "frequency_control_specs": "array (optional)", "is_dynamic_creative": "boolean (optional)" }] # Mode 2: Filter-based updates (mutually exclusive with adset_updates) filter: Filter criteria to select ad sets (optional) { "status": "string (optional)", "campaign_id": "string (optional)", "campaign_ids": "array (optional)", "name_contains": "string (optional)", "adset_ids": "array (optional)", "optimization_goal": "string (optional)" } updates: Uniform updates to apply to all matching ad sets (required when using filter) { "status": "string (optional)", "name": "string (optional)", "daily_budget": "integer (optional)", "daily_budget_multiplier": "float (optional)", "lifetime_budget": "integer (optional)", "bid_amount": "integer (optional)", "bid_amount_multiplier": "float (optional)", "bid_strategy": "string (optional)", "optimization_goal": "string (optional)", "targeting": "object (optional)", "frequency_control_specs": "array (optional)", "is_dynamic_creative": "boolean (optional)" }

Returns: JSON response with matched/updated/failed/skipped counts and detailed results

Example Usage: # Mode 1: Update specific ad sets bulk_update_adsets( account_id="act_123456", adset_updates=[ {"adset_id": "789", "bid_amount": 500}, {"adset_id": "012", "bid_amount": 750, "status": "ACTIVE"} ] )

# Mode 2: Add frequency cap to all ad sets in a campaign bulk_update_adsets( account_id="act_123456", filter={"campaign_id": "123", "status": "ACTIVE"}, updates={ "frequency_control_specs": [ {"event": "IMPRESSIONS", "interval_days": 7, "max_frequency": 3} ] } ) # Scale bid amounts by 20% for underperforming ad sets bulk_update_adsets( account_id="act_123456", filter={"campaign_id": "123", "optimization_goal": "LINK_CLICKS"}, updates={"bid_amount_multiplier": 1.2} )
ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of entities to update in a single operation (default: 20, max: 200). Increase with caution.
filterNoFilter criteria to select ad sets (filter mode)
dry_runNoIf true, returns list of entities that would be affected without making changes (default: false)
updatesNoUniform updates to apply to all matching ad sets (filter mode)
account_idYesMeta Ads account ID (format: act_XXXXXXXXX)
access_tokenNoMeta API access token (optional - will use cached token if not provided)
adset_updatesNoList of ad set update specifications (explicit mode)
bulk_update_campaignsTry in Inspector

⭐ PREMIUM FEATURE ⭐

Update multiple campaigns with individual or uniform parameters. Supports both explicit ID-based updates and filter-based batch updates.

⚠️ Requires: Premium or Enterprise plan 💡 Value: Manage multiple campaigns at scale and automate optimization tasks

Limits: Default limit of 20 entities per operation for safety. Can be increased up to 200 maximum by setting the 'limit' parameter (requires user confirmation for large updates).

Args: account_id: Meta Ads account ID (format: act_XXXXXXXXX) access_token: Meta API access token (optional) dry_run: If true, returns list of entities that would be affected without making changes (default: false) limit: Maximum number of entities to update (default: 20, max: 200). Use higher values with caution and user confirmation

# Mode 1: Explicit updates (mutually exclusive with filter mode) campaign_updates: List of campaign update specifications (optional) [{ "campaign_id": "string", "name": "string (optional)", "status": "string (optional)", "daily_budget": "integer (optional)", "lifetime_budget": "integer (optional)", "bid_strategy": "string (optional)", "spend_cap": "integer (optional)" }] # Mode 2: Filter-based updates (mutually exclusive with campaign_updates) filter: Filter criteria to select campaigns (optional) { "status": "string (optional)", "objective": "string (optional)", "name_contains": "string (optional)", "campaign_ids": "array (optional)", "min_daily_budget": "integer (optional)", "max_daily_budget": "integer (optional)" } updates: Uniform updates to apply to all matching campaigns (required when using filter) { "status": "string (optional)", "name": "string (optional)", "daily_budget": "integer (optional)", "daily_budget_multiplier": "float (optional)", "lifetime_budget": "integer (optional)", "bid_strategy": "string (optional)", "spend_cap": "integer (optional)" }

Returns: JSON response with matched/updated/failed/skipped counts and detailed results

Example Usage: # Mode 1: Update specific campaigns bulk_update_campaigns( account_id="act_123456", campaign_updates=[ {"campaign_id": "123", "status": "PAUSED"}, {"campaign_id": "456", "status": "PAUSED", "daily_budget": 15000} ] )

# Mode 2: Update filtered campaigns bulk_update_campaigns( account_id="act_123456", filter={"status": "ACTIVE", "name_contains": "Holiday"}, updates={"status": "PAUSED"} ) # Scale budgets by 50% for campaigns under $100/day bulk_update_campaigns( account_id="act_123456", filter={"status": "ACTIVE", "max_daily_budget": 10000}, updates={"daily_budget_multiplier": 1.5} )
ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of entities to update in a single operation (default: 20, max: 200). Increase with caution.
filterNoFilter criteria to select campaigns (filter mode)
dry_runNoIf true, returns list of entities that would be affected without making changes (default: false)
updatesNoUniform updates to apply to all matching campaigns (filter mode)
account_idYesMeta Ads account ID (format: act_XXXXXXXXX)
access_tokenNoMeta API access token (optional - will use cached token if not provided)
campaign_updatesNoList of campaign update specifications (explicit mode)
create_adTry in Inspector

Create a new ad with an existing creative.

Args: account_id: Meta Ads account ID (format: act_XXXXXXXXX) name: Ad name adset_id: Ad set ID where this ad will be placed creative_id: ID of an existing creative to use status: Initial ad status (default: PAUSED) bid_amount: Optional bid amount in account currency (in cents) tracking_specs: Optional tracking specifications (e.g., for pixel events). Example: [{"action.type":"offsite_conversion","fb_pixel":["YOUR_PIXEL_ID"]}] access_token: Meta API access token (optional - will use cached token if not provided)

Note: Dynamic Creative creatives require the parent ad set to have is_dynamic_creative=true. Otherwise, ad creation will fail with error_subcode 1885998.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYes
statusNoPAUSED
adset_idYes
account_idYes
bid_amountNo
creative_idYes
access_tokenNo
tracking_specsNo
create_ad_creativeTry in Inspector

Create a new ad creative using an uploaded image hash or video ID.

Supports three creative modes:

  • Simple image/video: Single image_hash or video_id with object_story_spec

  • Dynamic Creative: Multiple variants with dynamic_creative_spec (requires is_dynamic_creative on ad set)

  • FLEX/DOF (Advantage+): Set optimization_type="DEGREES_OF_FREEDOM" for Meta to auto-optimize across all asset combinations without requiring is_dynamic_creative on the ad set

Args: account_id: Meta Ads account ID (format: act_XXXXXXXXX) image_hash: Hash of a single uploaded image (cannot be used with image_hashes or video_id) access_token: Meta API access token (optional - will use cached token if not provided) name: Creative name page_id: Facebook Page ID (string or int; coerced to string) link_url: Destination URL for the ad (required unless using lead_gen_form_id) message: Single ad copy/text (cannot be used with messages) messages: List of primary text variants for FLEX/dynamic creatives (cannot be used with message) headline: Single headline for simple ads (cannot be used with headlines) headlines: List of headlines for dynamic creative testing (cannot be used with headline) description: Single description for simple ads (cannot be used with descriptions) descriptions: List of descriptions for dynamic creative testing (cannot be used with description) image_hashes: List of image hashes for FLEX creatives (up to 10, cannot be used with image_hash or video_id) video_id: Meta video ID for video creatives (cannot be used with image_hash or image_hashes). Upload a video first via the Meta API, then use the returned video ID here. thumbnail_url: Thumbnail image URL for video creatives. Recommended when using video_id. Meta will auto-generate a thumbnail if not provided. optimization_type: Set to "DEGREES_OF_FREEDOM" for FLEX (Advantage+) creatives that allow Meta to auto-optimize across all asset combinations. When using DEGREES_OF_FREEDOM, at least one asset field (image_hashes, messages, headlines, or descriptions) must contain more than one variant. dynamic_creative_spec: Dynamic creative optimization settings call_to_action_type: Call to action button type (e.g., 'LEARN_MORE', 'SIGN_UP', 'SHOP_NOW') lead_gen_form_id: Lead generation form ID for lead generation campaigns. Required when using lead generation CTAs like 'SIGN_UP', 'GET_OFFER', 'SUBSCRIBE', etc. instagram_actor_id: Optional Instagram account ID for Instagram placements. Sent as instagram_user_id inside object_story_spec (Meta deprecated instagram_actor_id in Jan 2026). ad_formats: List of ad format strings for asset_feed_spec (e.g., ["AUTOMATIC_FORMAT"] for Flexible ads, ["SINGLE_IMAGE"] for single image, ["SINGLE_VIDEO"] for video). When optimization_type is "DEGREES_OF_FREEDOM" with image_hashes, defaults to ["AUTOMATIC_FORMAT"] (Flexible format). For video creatives, defaults to ["SINGLE_VIDEO"]. Otherwise defaults to ["SINGLE_IMAGE"]. asset_customization_rules: List of placement-specific asset overrides for asset_feed_spec. Lets you assign different images or videos to specific placement groups (e.g., feed vs. stories). Only valid with image_hashes or plural asset params. Each rule uses a user-friendly format that is automatically translated to Meta's API format (adlabels + customization_spec positions): - placement_groups: list of placement group names Valid values: FEED, STORY, MESSENGER, INSTREAM_VIDEO, SEARCH, SHOP, AUDIENCE_NETWORK - customization_spec: dict specifying the asset to use for those placements Supported keys: image_hashes (list), video_ids (list), bodies, titles, descriptions (text overrides) All image hashes referenced in rules must also be in image_hashes. Example (feed gets one image, stories gets another): [ {"placement_groups": ["FEED"], "customization_spec": {"image_hashes": ["<feed_hash>"]}}, {"placement_groups": ["STORY"], "customization_spec": {"image_hashes": ["<story_hash>"]}} ]

Returns: JSON response with created creative details

ParametersJSON Schema
NameRequiredDescriptionDefault
nameNo
messageNo
page_idNo
headlineNo
link_urlNo
messagesNo
video_idNo
headlinesNo
account_idYes
ad_formatsNo
image_hashNo
descriptionNo
access_tokenNo
descriptionsNo
image_hashesNo
thumbnail_urlNo
lead_gen_form_idNo
optimization_typeNo
instagram_actor_idNo
call_to_action_typeNo
dynamic_creative_specNo
asset_customization_rulesNo
create_adsetTry in Inspector

Create a new ad set in a Meta Ads account.

Args: account_id: Meta Ads account ID (format: act_XXXXXXXXX) campaign_id: Meta Ads campaign ID this ad set belongs to name: Ad set name optimization_goal: Conversion optimization goal (e.g., 'LINK_CLICKS', 'REACH', 'CONVERSIONS', 'APP_INSTALLS', 'VALUE') billing_event: How you're charged (e.g., 'IMPRESSIONS', 'LINK_CLICKS') status: Initial ad set status (default: PAUSED) daily_budget: Daily budget in account currency (in cents) as a string lifetime_budget: Lifetime budget in account currency (in cents) as a string targeting: Targeting specs (age, location, interests, etc). targeting_automation.advantage_audience defaults to 0 if not set (Meta API v24+ requirement). Set to 1 to enable Advantage+ Audience (requires age_max>=65). Use search_interests for interest IDs. bid_amount: Bid amount in account currency (in cents). REQUIRED for: LOWEST_COST_WITH_BID_CAP, COST_CAP, TARGET_COST. NOT USED by: LOWEST_COST_WITH_MIN_ROAS (uses bid_constraints instead). May also be required if the parent campaign's bid strategy requires it. bid_strategy: Bid strategy. Valid values: - 'LOWEST_COST_WITHOUT_CAP' (recommended) - no bid_amount required - 'LOWEST_COST_WITH_BID_CAP' - REQUIRES bid_amount - 'COST_CAP' - REQUIRES bid_amount - 'LOWEST_COST_WITH_MIN_ROAS' - REQUIRES bid_constraints with roas_average_floor, and optimization_goal='VALUE'. Does NOT use bid_amount. Note: 'LOWEST_COST' is NOT valid - use 'LOWEST_COST_WITHOUT_CAP'. Campaign-level bid strategy may constrain ad set choices. bid_constraints: Bid constraints dict. Required for LOWEST_COST_WITH_MIN_ROAS. Use {"roas_average_floor": } where value = target ROAS * 10000. Example: 2.0x ROAS -> {"roas_average_floor": 20000} start_time: Start time in ISO 8601 format (e.g., '2023-12-01T12:00:00-0800') end_time: End time in ISO 8601 format dsa_beneficiary: DSA beneficiary for European compliance promoted_object: App config for APP_INSTALLS. Required: application_id, object_store_url. destination_type: Where users go after click. Common values: 'WEBSITE', 'WHATSAPP', 'MESSENGER', 'INSTAGRAM_DIRECT', 'ON_AD', 'APP', 'FACEBOOK', 'SHOP_AUTOMATIC'. Also supports multi-channel combos like 'MESSAGING_MESSENGER_WHATSAPP'. is_dynamic_creative: Enable Dynamic Creative for this ad set. access_token: Meta API access token (optional - will use cached token if not provided)

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYes
statusNoPAUSED
end_timeNo
targetingNo
account_idYes
bid_amountNo
start_timeNo
campaign_idYes
access_tokenNo
bid_strategyNo
daily_budgetNo
billing_eventYes
bid_constraintsNo
dsa_beneficiaryNo
lifetime_budgetNo
promoted_objectNo
destination_typeNo
optimization_goalYes
is_dynamic_creativeNo
create_budget_scheduleTry in Inspector

Create a budget schedule for a Meta Ads campaign.

Allows scheduling budget increases based on anticipated high-demand periods. The times should be provided as Unix timestamps.

Args: campaign_id: Meta Ads campaign ID. budget_value: Amount of budget increase. Interpreted based on budget_value_type. budget_value_type: Type of budget value - "ABSOLUTE" or "MULTIPLIER". time_start: Unix timestamp for when the high demand period should start. time_end: Unix timestamp for when the high demand period should end. access_token: Meta API access token (optional - will use cached token if not provided).

Returns: A JSON string containing the ID of the created budget schedule or an error message.

ParametersJSON Schema
NameRequiredDescriptionDefault
time_endYes
time_startYes
campaign_idYes
access_tokenNo
budget_valueYes
budget_value_typeYes
create_campaignTry in Inspector

Create a new campaign in a Meta Ads account.

Args: account_id: Meta Ads account ID (format: act_XXXXXXXXX) name: Campaign name objective: Campaign objective (ODAX, outcome-based). Must be one of: OUTCOME_AWARENESS, OUTCOME_TRAFFIC, OUTCOME_ENGAGEMENT, OUTCOME_LEADS, OUTCOME_SALES, OUTCOME_APP_PROMOTION. Note: Legacy objectives like BRAND_AWARENESS, LINK_CLICKS, CONVERSIONS, APP_INSTALLS, etc. are not valid for new campaigns and will cause a 400 error. Use the outcome-based values above (e.g., BRAND_AWARENESS → OUTCOME_AWARENESS). access_token: Meta API access token (optional - will use cached token if not provided) status: Initial campaign status (default: PAUSED) special_ad_categories: List of special ad categories if applicable daily_budget: Daily budget in account currency (in cents) as a string (only used if use_adset_level_budgets=False) lifetime_budget: Lifetime budget in account currency (in cents) as a string (only used if use_adset_level_budgets=False) buying_type: Buying type (e.g., 'AUCTION') bid_strategy: Bid strategy. Must be one of: 'LOWEST_COST_WITHOUT_CAP', 'LOWEST_COST_WITH_BID_CAP', 'COST_CAP', 'LOWEST_COST_WITH_MIN_ROAS'. bid_cap: Bid cap in account currency (in cents) as a string spend_cap: Spending limit for the campaign in account currency (in cents) as a string campaign_budget_optimization: Whether to enable campaign budget optimization (only used if use_adset_level_budgets=False) ab_test_control_setups: Settings for A/B testing (e.g., [{"name":"Creative A", "ad_format":"SINGLE_IMAGE"}]) use_adset_level_budgets: If True, budgets will be set at the ad set level instead of campaign level (default: False)

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYes
statusNoPAUSED
bid_capNo
objectiveYes
spend_capNo
account_idYes
buying_typeNo
access_tokenNo
bid_strategyNo
daily_budgetNo
lifetime_budgetNo
special_ad_categoriesNo
ab_test_control_setupsNo
use_adset_level_budgetsNo
campaign_budget_optimizationNo
create_email_reportTry in Inspector

Send a professional AI-powered email report analyzing your Meta Ads performance. Your first report is FREE - no subscription needed! Just use cadence "once".

Modes:

  • cadence "once": Send a single report now. Free users get 1 free report. Paid users: up to 3/month.

  • cadence "daily": Daily email reports (Pro plan+). First report sent immediately.

  • cadence "weekly": Weekly email reports (Pro plan+). First report sent immediately.

The report covers campaign performance, budget optimization, audience insights, and creative recommendations.

Args: account_id (required): Meta Ads account ID (format: act_XXXXXXXXX) cadence (required): "once" | "daily" | "weekly" emails (optional): Recipient email addresses (max 5). Defaults to your account email if omitted. time_range (optional): Default "last_7d". Options: last_1d, last_3d, last_7d, last_14d, last_30d language (optional): Default "English" day_of_week (optional): For weekly only. 0=Sunday through 6=Saturday preferred_hour_utc (optional): Delivery hour (0-23 UTC). Default 8

ParametersJSON Schema
NameRequiredDescriptionDefault
emailsNoRecipient email addresses. Defaults to your account email if omitted.
cadenceYesReport frequency
languageNoReport language (default: English)
account_idYesMeta Ads account ID (act_XXXXXXXXX)
time_rangeNo
day_of_weekNo
preferred_hour_utcNo
duplicate_adTry in Inspector

Duplicate a Meta Ads ad.

Recommended: Use this to run robust experiments.

Args: ad_id: Meta Ads ad ID to duplicate target_adset_id: Ad set ID to move the duplicated ad to (optional) name_suffix: Suffix to add to the duplicated ad name duplicate_creative: Whether to duplicate the ad creative new_creative_name: Override name for the duplicated creative new_status: Status for the new ad (ACTIVE or PAUSED)

ParametersJSON Schema
NameRequiredDescriptionDefault
ad_idYes
pb_tokenNo
new_statusNoPAUSED
name_suffixNo - Copy
access_tokenNo
target_adset_idNo
new_creative_nameNo
duplicate_creativeNo
duplicate_adsetTry in Inspector

Duplicate a Meta Ads ad set with its ads.

Recommended: Use this to run robust experiments.

Args: adset_id: Meta Ads ad set ID to duplicate target_campaign_id: Campaign ID to move the duplicated ad set to (optional) name_suffix: Suffix to add to the duplicated ad set name include_ads: Whether to duplicate ads within the ad set include_creatives: Whether to duplicate ad creatives new_daily_budget: Override the daily budget for the new ad set new_targeting: Override targeting settings for the new ad set new_status: Status for the new ad set (ACTIVE or PAUSED)

ParametersJSON Schema
NameRequiredDescriptionDefault
adset_idYes
pb_tokenNo
new_statusNoPAUSED
include_adsNo
name_suffixNo - Copy
access_tokenNo
new_targetingNo
new_daily_budgetNo
include_creativesNo
target_campaign_idNo
duplicate_campaignTry in Inspector

Duplicate a Meta Ads campaign with all its ad sets and ads.

Recommended: Use this to run robust experiments.

Args: campaign_id: Meta Ads campaign ID to duplicate name_suffix: Suffix to add to the duplicated campaign name include_ad_sets: Whether to duplicate ad sets within the campaign include_ads: Whether to duplicate ads within ad sets include_creatives: Whether to duplicate ad creatives copy_schedule: Whether to copy the campaign schedule new_daily_budget: Override the daily budget for the new campaign new_status: Status for the new campaign (ACTIVE or PAUSED)

ParametersJSON Schema
NameRequiredDescriptionDefault
pb_tokenNo
new_statusNoPAUSED
campaign_idYes
include_adsNo
name_suffixNo - Copy
access_tokenNo
copy_scheduleNo
include_ad_setsNo
new_daily_budgetNo
include_creativesNo
duplicate_creativeTry in Inspector

Duplicate a Meta Ads creative.

Recommended: Use this to run robust experiments.

Args: creative_id: Meta Ads creative ID to duplicate name_suffix: Suffix to add to the duplicated creative name new_primary_text: Override the primary text for the new creative new_headline: Override the headline for the new creative new_description: Override the description for the new creative new_cta_type: Override the call-to-action type for the new creative new_destination_url: Override the destination URL for the new creative

ParametersJSON Schema
NameRequiredDescriptionDefault
pb_tokenNo
creative_idYes
name_suffixNo - Copy
access_tokenNo
new_cta_typeNo
new_headlineNo
new_descriptionNo
new_primary_textNo
new_destination_urlNo
estimate_audience_sizeTry in Inspector

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

ParametersJSON Schema
NameRequiredDescriptionDefault
targetingNo
account_idNo
access_tokenNo
interest_listNo
optimization_goalNoREACH
interest_fbid_listNo
fetchTry in Inspector

Fetch complete record data by ID. It retrieves the full data for a specific record identified by its ID.

Args: id: The record ID to fetch (format: "type:id", e.g., "account:act_123456")

Returns: JSON response with complete record data including id, title, text, and metadata

Example Usage: fetch(id="account:act_123456789") fetch(id="campaign:23842588888640185") fetch(id="ad:23842614006130185") fetch(id="page:123456789")

ParametersJSON Schema
NameRequiredDescriptionDefault
idYes
get_account_infoTry in Inspector

Get detailed information about a specific ad account.

Args: account_id: Meta Ads account ID (format: act_XXXXXXXXX) access_token: Meta API access token (optional - will use cached token if not provided)

ParametersJSON Schema
NameRequiredDescriptionDefault
account_idYes
access_tokenNo
get_account_pagesTry in Inspector

Get pages associated with a Meta Ads account.

Args: account_id: Meta Ads account ID (format: act_XXXXXXXXX) access_token: Meta API access token (optional - will use cached token if not provided)

Returns: JSON response with pages associated with the account

ParametersJSON Schema
NameRequiredDescriptionDefault
account_idYes
access_tokenNo
get_ad_accountsTry in Inspector

Get ad accounts accessible by a user.

amount_spent and balance are returned in currency units (e.g. USD dollars), not cents.

Args: access_token: Meta API access token (optional - will use cached token if not provided) user_id: Meta user ID or "me" for the current user limit: Maximum number of accounts to return (default: 200)

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
user_idNome
access_tokenNo
get_ad_creativesTry in Inspector

Get creative details for a specific ad. Requires an ad_id (not account_id). Use get_ads first to find ad IDs.

Args: ad_id: Meta Ads ad ID (required) access_token: Meta API access token (optional - will use cached token if not provided)

ParametersJSON Schema
NameRequiredDescriptionDefault
ad_idYes
access_tokenNo
get_ad_detailsTry in Inspector

Get detailed information about a specific ad.

Args: ad_id: Meta Ads ad ID access_token: Meta API access token (optional - will use cached token if not provided)

ParametersJSON Schema
NameRequiredDescriptionDefault
ad_idYes
access_tokenNo
get_ad_imageTry in Inspector

Get, download, and visualize a Meta ad image in one step. Useful to see the image in the LLM.

Args: ad_id: Meta Ads ad ID access_token: Meta API access token (optional - will use cached token if not provided)

Returns: The ad image ready for direct visual analysis

ParametersJSON Schema
NameRequiredDescriptionDefault
ad_idYes
access_tokenNo
get_adsTry in Inspector

Get ads for a Meta Ads account with optional filtering.

Args: account_id: Meta Ads account ID (format: act_XXXXXXXXX) access_token: Meta API access token (optional - will use cached token if not provided) limit: Maximum number of ads to return (default: 10) campaign_id: Optional campaign ID to filter by adset_id: Optional ad set ID to filter by

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
adset_idNo
account_idYes
campaign_idNo
access_tokenNo
get_adset_detailsTry in Inspector

Get detailed information about a specific ad set.

Args: adset_id: Meta Ads ad set ID access_token: Meta API access token (optional - will use cached token if not provided)

Example: To call this function through MCP, pass the adset_id as the first argument: { "args": "YOUR_ADSET_ID" }

ParametersJSON Schema
NameRequiredDescriptionDefault
adset_idYes
access_tokenNo
get_adsetsTry in Inspector

Get ad sets for a Meta Ads account with optional filtering by campaign.

Args: account_id: Meta Ads account ID (format: act_XXXXXXXXX) access_token: Meta API access token (optional - will use cached token if not provided) limit: Maximum number of ad sets to return (default: 10) campaign_id: Optional campaign ID to filter by

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
account_idYes
campaign_idNo
access_tokenNo
get_campaign_detailsTry in Inspector

Get detailed information about a specific campaign.

Note: This function requests a specific set of fields ('id,name,objective,status,...'). The Meta API offers many other fields for campaigns (e.g., 'effective_status', 'source_campaign_id', etc.) that could be added to the 'fields' parameter in the code if needed.

Args: campaign_id: Meta Ads campaign ID access_token: Meta API access token (optional - will use cached token if not provided)

ParametersJSON Schema
NameRequiredDescriptionDefault
campaign_idYes
access_tokenNo
get_campaignsTry in Inspector

Get campaigns for a Meta Ads account with optional filtering.

Note: By default, the Meta API returns a subset of available fields. Other fields like 'effective_status', 'special_ad_categories', 'lifetime_budget', 'spend_cap', 'budget_remaining', 'promoted_object', 'source_campaign_id', etc., might be available but require specifying them in the API call (currently not exposed by this tool's parameters).

Args: account_id: Meta Ads account ID (format: act_XXXXXXXXX) access_token: Meta API access token (optional - will use cached token if not provided) limit: Maximum number of campaigns to return (default: 10) status_filter: Filter by effective status (e.g., 'ACTIVE', 'PAUSED', 'ARCHIVED'). Maps to the 'effective_status' API parameter, which expects an array (this function handles the required JSON formatting). Leave empty for all statuses. objective_filter: Filter by campaign objective(s). Can be a single objective string or a list of objectives. Valid objectives: 'OUTCOME_AWARENESS', 'OUTCOME_TRAFFIC', 'OUTCOME_ENGAGEMENT', 'OUTCOME_LEADS', 'OUTCOME_SALES', 'OUTCOME_APP_PROMOTION'. Examples: 'OUTCOME_LEADS' or ['OUTCOME_LEADS', 'OUTCOME_SALES']. Leave empty for all objectives. after: Pagination cursor to get the next set of results

ParametersJSON Schema
NameRequiredDescriptionDefault
afterNo
limitNo
account_idYes
access_tokenNo
status_filterNo
objective_filterNo
get_creative_detailsTry in Inspector

Get detailed information about a specific ad creative by its ID.

Args: creative_id: Meta Ads creative ID (required) access_token: Meta API access token (optional)

ParametersJSON Schema
NameRequiredDescriptionDefault
creative_idYes
access_tokenNo
get_insightsTry in Inspector

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"} time_breakdown: Optional time dimension to break down metrics by Supported values: "day", "week", "month" - day: Daily breakdown (returns metrics for each day in the range) - week: Weekly breakdown (returns metrics for each week) - month: Monthly breakdown (returns metrics for each month) When specified, returns segmented_metrics array with per-period data plus aggregates 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 level: Level of aggregation (ad, adset, campaign, account) limit: Maximum number of results to return per page (default: 25) after: Pagination cursor to get the next set of results action_attribution_windows: Optional list of attribution windows (e.g., ["1d_click", "7d_click", "1d_view"])

Returns: When time_breakdown is NOT specified: Standard Meta Insights API response with aggregated metrics for the entire period

When time_breakdown IS specified: JSON response with: - object_id: The queried object ID - level: Aggregation level used - time_range: The date range queried {since, until} - time_breakdown: The segmentation type - total_segments: Number of time periods - aggregates: Sum totals for the entire period - segmented_metrics: Array of per-period metrics [{ "period": "2025-01" (month) or "2025-01-15" (day/week start), "period_start": "2025-01-01", "period_end": "2025-01-31", "metrics": { impressions, clicks, spend, ... } }] - execution_time_ms: Total execution time

Example Usage: # Get last 30 days aggregated (default behavior) get_insights( object_id="act_123456789", time_range="last_30d", level="account" )

# Get monthly breakdown for a full year get_insights( object_id="act_123456789", time_range={"since": "2025-01-01", "until": "2025-12-31"}, time_breakdown="month", level="account" ) # Get daily breakdown for last 7 days get_insights( object_id="act_123456789", time_range="last_7d", time_breakdown="day", level="campaign" ) # Get weekly breakdown with breakdown by device get_insights( object_id="act_123456789", time_range="last_90d", time_breakdown="week", breakdown="device_platform", level="account" )
ParametersJSON Schema
NameRequiredDescriptionDefault
afterNoPagination cursor for next page
levelNoLevel of aggregationad
limitNoMaximum number of results to return per page
breakdownNoOptional breakdown dimension (e.g., age, gender, country, device_platform)
object_idYesID of the campaign, ad set, ad or account
time_rangeNoTime range as preset string or {since, until} object with YYYY-MM-DD datesmaximum
access_tokenNoMeta API access token (optional - will use cached token if not provided)
time_breakdownNoOptional time dimension to segment metrics by. Use "day" for daily, "week" for weekly, or "month" for monthly breakdown.
action_attribution_windowsNoOptional list of attribution windows
get_instagram_accountsTry in Inspector

Get Instagram business accounts associated with an ad account that can be used as instagram_actor_id when creating ad creatives.

Args: account_id: Meta Ads account ID (format: act_XXXXXXXXX)

Returns: List of Instagram accounts with id, username, name, profile_picture_url, and followers_count

ParametersJSON Schema
NameRequiredDescriptionDefault
account_idYesMeta Ads account ID (format: act_XXXXXXXXX).
get_interest_suggestionsTry in Inspector

Get interest suggestions based on existing interests.

Args: interest_list: List of interest names to get suggestions for (e.g., ["Basketball", "Soccer"]) access_token: Meta API access token (optional - will use cached token if not provided)
limit: Maximum number of suggestions to return (default: 25)

Returns: JSON string containing suggested interests with id, name, audience_size, and description fields

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
access_tokenNo
interest_listYes
search_behaviorsTry in Inspector

Get all available behavior targeting options.

Args: access_token: Meta API access token (optional - will use cached token if not provided) limit: Maximum number of results to return (default: 50)

Returns: JSON string containing behavior targeting options with id, name, audience_size bounds, path, and description

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
access_tokenNo
search_demographicsTry in Inspector

Get demographic targeting options.

Args: access_token: Meta API access token (optional - will use cached token if not provided) demographic_class: Type of demographics to retrieve. Options: 'demographics', 'life_events', 'industries', 'income', 'family_statuses', 'user_device', 'user_os' (default: 'demographics') limit: Maximum number of results to return (default: 50)

Returns: JSON string containing demographic targeting options with id, name, audience_size bounds, path, and description

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
access_tokenNo
demographic_classNodemographics
search_geo_locationsTry in Inspector

Search for geographic targeting locations.

Args: query: Search term for locations (e.g., "New York", "California", "Japan") access_token: Meta API access token (optional - will use cached token if not provided) location_types: Types of locations to search. Options: ['country', 'region', 'city', 'zip', 'geo_market', 'electoral_district']. If not specified, searches all types. limit: Maximum number of results to return (default: 25)

Returns: JSON string containing location data with key, name, type, and geographic hierarchy information

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYes
access_tokenNo
location_typesNo
search_interestsTry in Inspector

Search for interest targeting options by keyword.

Args: query: Search term for interests (e.g., "baseball", "cooking", "travel") access_token: Meta API access token (optional - will use cached token if not provided) limit: Maximum number of results to return (default: 25)

Returns: JSON string containing interest data with id, name, audience_size, and path fields

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYes
access_tokenNo
search_pages_by_nameTry in Inspector

Search for pages by name within an account.

Args: account_id: Meta Ads account ID (format: act_XXXXXXXXX) access_token: Meta API access token (optional - will use cached token if not provided) search_term: Search term to find pages by name (optional - returns all pages if not provided)

Returns: JSON response with matching pages

ParametersJSON Schema
NameRequiredDescriptionDefault
account_idYes
search_termNo
access_tokenNo
update_adTry in Inspector

Update an ad with new settings.

Args: ad_id: Meta Ads ad ID status: Update ad status (ACTIVE, PAUSED, etc.) bid_amount: Bid amount in account currency (in cents for USD) tracking_specs: Optional tracking specifications (e.g., for pixel events). creative_id: ID of the creative to associate with this ad (changes the ad's image/content) access_token: Meta API access token (optional - will use cached token if not provided)

ParametersJSON Schema
NameRequiredDescriptionDefault
ad_idYes
statusNo
bid_amountNo
creative_idNo
access_tokenNo
tracking_specsNo
update_ad_creativeTry in Inspector

Update an existing ad creative's name or optimization settings.

IMPORTANT — Meta API limitation: The Meta API does NOT allow updating content fields (message, headline, description, CTA, image, video, URL) on existing creatives. Only the creative name and optimization settings (asset_feed_spec) can be changed. To change ad content, create a new creative with the desired content and update the ad to reference the new creative via update_ad.

Args: creative_id: Meta Ads creative ID to update access_token: Meta API access token (optional - will use cached token if not provided) name: New creative name (this is the most reliable update) message: New ad copy/text — NOTE: Meta API may reject this on existing creatives messages: List of primary text variants — NOTE: Meta API may reject this on existing creatives headline: Single headline — NOTE: Meta API may reject this on existing creatives headlines: New list of headlines — NOTE: Meta API may reject this on existing creatives description: Single description — NOTE: Meta API may reject this on existing creatives descriptions: New list of descriptions — NOTE: Meta API may reject this on existing creatives optimization_type: Set to "DEGREES_OF_FREEDOM" for FLEX (Advantage+) creatives dynamic_creative_spec: New dynamic creative optimization settings call_to_action_type: New call to action button type — NOTE: Meta API may reject this on existing creatives lead_gen_form_id: Lead generation form ID for lead generation campaigns ad_formats: List of ad format strings for asset_feed_spec (e.g., ["AUTOMATIC_FORMAT"] for Flexible ads, ["SINGLE_IMAGE"] for single image)

Returns: JSON response with updated creative details

ParametersJSON Schema
NameRequiredDescriptionDefault
nameNo
messageNo
headlineNo
messagesNo
headlinesNo
ad_formatsNo
creative_idYes
descriptionNo
access_tokenNo
descriptionsNo
lead_gen_form_idNo
optimization_typeNo
call_to_action_typeNo
dynamic_creative_specNo
update_adsetTry in Inspector

Update an ad set with new settings including frequency caps and budgets.

Args: adset_id: Meta Ads ad set ID frequency_control_specs: Frequency control specs (e.g. [{"event": "IMPRESSIONS", "interval_days": 7, "max_frequency": 3}]) bid_strategy: Bid strategy. Valid values: - 'LOWEST_COST_WITHOUT_CAP' (recommended) - no bid_amount required - 'LOWEST_COST_WITH_BID_CAP' - REQUIRES bid_amount - 'COST_CAP' - REQUIRES bid_amount - 'LOWEST_COST_WITH_MIN_ROAS' - REQUIRES bid_constraints with roas_average_floor Note: 'LOWEST_COST' is NOT valid - use 'LOWEST_COST_WITHOUT_CAP'. bid_amount: Bid amount in cents. Required for LOWEST_COST_WITH_BID_CAP, COST_CAP, TARGET_COST. NOT USED by LOWEST_COST_WITH_MIN_ROAS (uses bid_constraints instead). bid_constraints: Bid constraints dict. Required for LOWEST_COST_WITH_MIN_ROAS. Use {"roas_average_floor": } where value = target ROAS * 10000. Example: 2.0x ROAS -> {"roas_average_floor": 20000} status: Update ad set status (ACTIVE, PAUSED, etc.) targeting: Complete targeting specifications (replaces existing targeting) optimization_goal: Conversion optimization goal (e.g., 'LINK_CLICKS', 'CONVERSIONS', 'VALUE') daily_budget: Daily budget in account currency (in cents) lifetime_budget: Lifetime budget in account currency (in cents) is_dynamic_creative: Enable/disable Dynamic Creative for this ad set. access_token: Meta API access token (optional - will use cached token if not provided)

ParametersJSON Schema
NameRequiredDescriptionDefault
statusNo
adset_idYes
targetingNo
bid_amountNo
access_tokenNo
bid_strategyNo
daily_budgetNo
bid_constraintsNo
lifetime_budgetNo
optimization_goalNo
is_dynamic_creativeNo
frequency_control_specsNo
update_campaignTry in Inspector

Update an existing campaign in a Meta Ads account.

Args: campaign_id: Meta Ads campaign ID access_token: Meta API access token (optional - will use cached token if not provided) name: New campaign name status: New campaign status (e.g., 'ACTIVE', 'PAUSED') special_ad_categories: List of special ad categories if applicable daily_budget: New daily budget in account currency (in cents) as a string. Set to empty string "" to remove the daily budget. lifetime_budget: New lifetime budget in account currency (in cents) as a string. Set to empty string "" to remove the lifetime budget. bid_strategy: New bid strategy bid_cap: New bid cap in account currency (in cents) as a string spend_cap: New spending limit for the campaign in account currency (in cents) as a string campaign_budget_optimization: Enable/disable campaign budget optimization objective: New campaign objective (Note: May not always be updatable) use_adset_level_budgets: If True, removes campaign-level budgets to switch to ad set level budgets

ParametersJSON Schema
NameRequiredDescriptionDefault
nameNo
statusNo
bid_capNo
objectiveNo
spend_capNo
campaign_idYes
access_tokenNo
bid_strategyNo
daily_budgetNo
lifetime_budgetNo
special_ad_categoriesNo
use_adset_level_budgetsNo
campaign_budget_optimizationNo
upload_ad_imageTry in Inspector

Upload an image to use in Meta Ads creatives.

Args: account_id: Meta Ads account ID (format: act_XXXXXXXXX) access_token: Meta API access token (optional - will use cached token if not provided) file: Data URL or raw base64 string of the image (e.g., "data:image/png;base64,iVBORw0KG...") image_url: Direct URL to an image to fetch and upload name: Optional name for the image (default: filename)

Returns: JSON response with image details including hash for creative creation

ParametersJSON Schema
NameRequiredDescriptionDefault
fileNo
nameNo
image_urlNo
account_idYes
access_tokenNo

Discussions

No comments yet. Be the first to start the discussion!

Try in Browser

Your Connectors

Sign in to create a connector for this server.