Meta Ads MCP Server for Cloudflare Workers
Test Meta Ads tools directly in your browser. Select a tool and provide inputs to see the results.
Create a free account to test Meta Ads tools interactively. No credit card required.
metaads_delete_audienceDelete a custom audience. This permanently deletes the audience. Args: - audienceId: Audience ID to delete (required) Returns: Confirmation of deletion.
metaads_list_ad_accountsList all ad accounts accessible to the authenticated user. Returns a paginated list of ad accounts with their status, currency, and timezone. Args: - limit: Number of accounts to return (1-100, default: 25) - after: Pagination cursor for next page - fields: Comma-separated list of fields to return - format: Response format ('json' or 'markdown') Returns: List of ad accounts with id, name, status, currency, timezone, etc.
metaads_get_ad_accountGet details for a specific ad account. Args: - accountId: The ad account ID (with or without 'act_' prefix) - fields: Comma-separated list of fields to return - format: Response format ('json' or 'markdown') Returns: Ad account details including id, name, status, balance, currency, timezone, etc.
metaads_list_adsList ads for an ad account. Returns a paginated list of ads with their status, creative, and ad set. Args: - accountId: The ad account ID (required) - limit: Number of ads to return (1-100, default: 25) - after: Pagination cursor for next page - adSetId: Filter by ad set ID - effectiveStatus: Filter by effective status (array of statuses) - fields: Comma-separated list of fields to return - format: Response format ('json' or 'markdown') Returns: List of ads with id, name, status, creative, ad set, etc.
metaads_get_adGet details for a specific ad. Args: - adId: The ad ID (required) - fields: Comma-separated list of fields to return - format: Response format ('json' or 'markdown') Returns: Ad details including id, name, status, creative, tracking specs, etc.
metaads_create_adCreate a new ad. Creates an ad with a creative linked to an ad set. Ads are created in PAUSED status by default. Args: - accountId: The ad account ID (required) - adSetId: The ad set ID this ad belongs to (required) - name: Ad name (required) - creative: Creative specification (required) - JSON object with either: - For new creative: { name: 'Creative Name', object_story_spec: { page_id: '...', link_data: { ... } } } - For existing creative: { creative_id: 'existing_creative_id' } - status: Initial status (default: PAUSED) Returns: The created ad with all fields.
metaads_update_adUpdate an existing ad. Update ad settings such as name, status, or creative. Args: - adId: Ad ID to update (required) - name: New ad name - status: New status (ACTIVE, PAUSED, DELETED, ARCHIVED) - creative: New creative specification Returns: The updated ad with all fields.
metaads_delete_adDelete an ad. This permanently deletes the ad. Use update with status='ARCHIVED' for soft delete. Args: - adId: Ad ID to delete (required) Returns: Confirmation of deletion.
metaads_list_adsetsList ad sets for an ad account. Returns a paginated list of ad sets with their targeting, budget, and optimization settings. Args: - accountId: The ad account ID (required) - limit: Number of ad sets to return (1-100, default: 25) - after: Pagination cursor for next page - campaignId: Filter by campaign ID - effectiveStatus: Filter by effective status (array of statuses) - fields: Comma-separated list of fields to return - format: Response format ('json' or 'markdown') Returns: List of ad sets with id, name, status, targeting, budget, optimization, etc.
metaads_get_adsetGet details for a specific ad set. Args: - adSetId: The ad set ID (required) - fields: Comma-separated list of fields to return - format: Response format ('json' or 'markdown') Returns: Ad set details including id, name, targeting, budget, optimization, schedule, etc.
metaads_upload_imageUpload an ad image. Uploads an image to the ad account's image library. The returned hash can be used when creating ad creatives. Args: - accountId: The ad account ID (required) - imageData: Base64 encoded image data (required) - name: Image name Returns: The uploaded image with hash, url, dimensions, etc.
metaads_create_adsetCreate a new ad set. Creates an ad set with targeting, budget, and optimization settings. Ad sets are created in PAUSED status by default. Args: - accountId: The ad account ID (required) - campaignId: The campaign ID this ad set belongs to (required) - name: Ad set name (required) - billingEvent: What you're charged for (required) - IMPRESSIONS, LINK_CLICKS, etc. - optimizationGoal: What to optimize for (required) - CONVERSIONS, LINK_CLICKS, etc. - targeting: Targeting specification (required) - JSON object with: - geo_locations: { countries: ['US'], cities: [...] } - age_min: Minimum age (13-65) - age_max: Maximum age (13-65) - genders: [1] for male, [2] for female, [1,2] for all - interests: [{ id: '123', name: 'Interest' }] - custom_audiences: [{ id: 'audience_id' }] - publisher_platforms: ['facebook', 'instagram'] - status: Initial status (default: PAUSED) - dailyBudget: Daily budget in cents - lifetimeBudget: Lifetime budget in cents - bidAmount: Bid amount in cents - bidStrategy: Bid strategy - startTime: Start time (ISO 8601) - endTime: End time (ISO 8601) Returns: The created ad set with all fields.
metaads_update_adsetUpdate an existing ad set. Update ad set settings such as name, status, targeting, budget, or optimization. Args: - adSetId: Ad set ID to update (required) - name: New ad set name - status: New status (ACTIVE, PAUSED, DELETED, ARCHIVED) - targeting: New targeting specification - dailyBudget: New daily budget in cents - lifetimeBudget: New lifetime budget in cents - bidAmount: New bid amount in cents - bidStrategy: New bid strategy - optimizationGoal: New optimization goal - billingEvent: New billing event - startTime: New start time (ISO 8601) - endTime: New end time (ISO 8601) Returns: The updated ad set with all fields.
metaads_delete_adsetDelete an ad set. This permanently deletes the ad set. Use update with status='ARCHIVED' for soft delete. Args: - adSetId: Ad set ID to delete (required) Returns: Confirmation of deletion.
metaads_list_audiencesList custom audiences for an ad account. Returns a paginated list of custom audiences including website, app, and customer list audiences. Args: - accountId: The ad account ID (required) - limit: Number of audiences to return (1-100, default: 25) - after: Pagination cursor for next page - fields: Comma-separated list of fields to return - format: Response format ('json' or 'markdown') Returns: List of audiences with id, name, subtype, approximate size, etc.
metaads_get_audienceGet details for a specific custom audience. Args: - audienceId: The audience ID (required) - fields: Comma-separated list of fields to return - format: Response format ('json' or 'markdown') Returns: Audience details including name, subtype, size, data source, delivery status, etc.
metaads_create_audienceCreate a new custom audience. Creates a custom audience that can be used for ad targeting. Subtypes: - CUSTOM: Customer list audience (upload emails, phone numbers, etc.) - WEBSITE: Website visitors (requires pixel) - APP: App users - ENGAGEMENT: People who engaged with your content - LOOKALIKE: Similar to source audience Args: - accountId: The ad account ID (required) - name: Audience name (required) - subtype: Audience subtype (required) - description: Audience description - customerFileSource: For CUSTOM subtype: 'USER_PROVIDED_ONLY', 'PARTNER_PROVIDED_ONLY', 'BOTH_USER_AND_PARTNER_PROVIDED' - pixelId: For WEBSITE subtype: pixel ID - rule: For WEBSITE subtype: JSON rule for matching visitors - prefill: For WEBSITE subtype: prefill with historical data (true/false) - retentionDays: How long to keep users in audience (1-180 days) - lookalikeSpec: For LOOKALIKE subtype: { origin_audience_id, ratio, country } Returns: The created audience with all fields.
metaads_update_audienceUpdate an existing custom audience. Args: - audienceId: Audience ID to update (required) - name: New audience name - description: New description - optOutLink: Privacy opt-out link Returns: The updated audience with all fields.
metaads_add_users_to_audienceAdd users to a custom audience. Adds users to a CUSTOM subtype audience using hashed identifiers. Schema types: - EMAIL, EMAIL_SHA256: Email addresses - PHONE, PHONE_SHA256: Phone numbers - FN: First name - LN: Last name - EXTERN_ID: External ID - MADID: Mobile Advertiser ID Args: - audienceId: Audience ID (required) - schema: Array of identifier types in order (required) - data: Array of user data arrays matching schema (required) Example: schema: ['EMAIL_SHA256', 'PHONE_SHA256'] data: [['hashed_email1', 'hashed_phone1'], ['hashed_email2', 'hashed_phone2']] Returns: Result with audience_id, num_received, num_invalid_entries.
metaads_remove_users_from_audienceRemove users from a custom audience. Removes users from a CUSTOM subtype audience. Args: - audienceId: Audience ID (required) - schema: Array of identifier types in order (required) - data: Array of user data arrays matching schema (required) Returns: Result with audience_id, num_received, num_invalid_entries.
metaads_list_businessesList businesses accessible to the authenticated user. Returns a paginated list of Business Manager accounts. Args: - limit: Number of businesses to return (1-100, default: 25) - after: Pagination cursor for next page - format: Response format ('json' or 'markdown') Returns: List of businesses with id, name, verification_status, etc.
metaads_get_businessGet details for a specific business. Args: - businessId: The business ID (required) - format: Response format ('json' or 'markdown') Returns: Business details including name, created_time, verification_status, primary_page, etc.
metaads_list_business_ad_accountsList ad accounts owned by a business. Returns a paginated list of ad accounts that belong to the specified business. Args: - businessId: The business ID (required) - limit: Number of ad accounts to return (1-100, default: 25) - after: Pagination cursor for next page - format: Response format ('json' or 'markdown') Returns: List of ad accounts with id, name, status, currency, etc.
metaads_list_campaignsList campaigns for an ad account. Returns a paginated list of campaigns with their status, objective, and budget. Args: - accountId: The ad account ID (required) - limit: Number of campaigns to return (1-100, default: 25) - after: Pagination cursor for next page - effectiveStatus: Filter by effective status (array of statuses) - fields: Comma-separated list of fields to return - format: Response format ('json' or 'markdown') Returns: List of campaigns with id, name, objective, status, budget, etc.
metaads_get_campaignGet details for a specific campaign. Args: - campaignId: The campaign ID (required) - fields: Comma-separated list of fields to return - format: Response format ('json' or 'markdown') Returns: Campaign details including id, name, objective, status, budget, schedule, etc.
metaads_get_creativeGet details for a specific ad creative. Args: - creativeId: The creative ID (required) - fields: Comma-separated list of fields to return - format: Response format ('json' or 'markdown') Returns: Creative details including object_story_spec, asset_feed_spec, etc.
metaads_create_campaignCreate a new campaign. Creates a new advertising campaign with the specified objective and settings. Campaigns are created in PAUSED status by default for review before activation. Args: - accountId: The ad account ID (required) - name: Campaign name (required) - objective: Campaign objective (required) - one of: - OUTCOME_AWARENESS, OUTCOME_ENGAGEMENT, OUTCOME_LEADS, OUTCOME_SALES, - OUTCOME_TRAFFIC, OUTCOME_APP_PROMOTION - status: Initial status (default: PAUSED) - specialAdCategories: Array of special ad categories (default: ['NONE']) - dailyBudget: Daily budget in cents (e.g., 1000 = $10.00) - lifetimeBudget: Lifetime budget in cents - bidStrategy: Bid strategy for the campaign - spendCap: Spend cap in cents - buyingType: 'AUCTION' or 'RESERVED' (default: AUCTION) - startTime: Campaign start time (ISO 8601 format) - stopTime: Campaign stop time (ISO 8601 format) Returns: The created campaign with all fields.
metaads_update_campaignUpdate an existing campaign. Update campaign settings such as name, status, budget, or schedule. Args: - campaignId: Campaign ID to update (required) - name: New campaign name - status: New status (ACTIVE, PAUSED, DELETED, ARCHIVED) - dailyBudget: New daily budget in cents - lifetimeBudget: New lifetime budget in cents - bidStrategy: New bid strategy - spendCap: New spend cap in cents - startTime: New start time (ISO 8601) - stopTime: New stop time (ISO 8601) Returns: The updated campaign with all fields.
metaads_delete_campaignDelete a campaign. This permanently deletes the campaign. Use update with status='ARCHIVED' for soft delete. Args: - campaignId: Campaign ID to delete (required) Returns: Confirmation of deletion.
metaads_list_catalogsList product catalogs for a business. Returns a paginated list of product catalogs. Args: - businessId: The business ID (required) - limit: Number of catalogs to return (1-100, default: 25) - after: Pagination cursor for next page - fields: Comma-separated list of fields to return - format: Response format ('json' or 'markdown') Returns: List of catalogs with id, name, vertical, product_count, etc.
metaads_get_catalogGet details for a specific product catalog. Args: - catalogId: The catalog ID (required) - fields: Comma-separated list of fields to return - format: Response format ('json' or 'markdown') Returns: Catalog details including name, vertical, product_count, feed_count, etc.
metaads_list_product_setsList product sets for a catalog. Product sets are subsets of products used for dynamic ads targeting. Args: - catalogId: The catalog ID (required) - limit: Number of product sets to return (1-100, default: 25) - after: Pagination cursor for next page - format: Response format ('json' or 'markdown') Returns: List of product sets with id, name, product_count, filter, etc.
metaads_list_creativesList ad creatives for an ad account. Returns a paginated list of creatives with their specifications. Args: - accountId: The ad account ID (required) - limit: Number of creatives to return (1-100, default: 25) - after: Pagination cursor for next page - fields: Comma-separated list of fields to return - format: Response format ('json' or 'markdown') Returns: List of creatives with id, name, object_story_spec, status, etc.
metaads_create_creativeCreate a new ad creative. Creates a standalone creative that can be used by multiple ads. Args: - accountId: The ad account ID (required) - name: Creative name - objectStorySpec: Object story specification (for link/video/photo ads) Example for link ad: { "page_id": "your_page_id", "link_data": { "link": "https://example.com", "message": "Check out our offer!", "name": "Product Name", "description": "Product description", "image_hash": "abc123...", "call_to_action": { "type": "LEARN_MORE", "value": { "link": "https://example.com" } } } } - assetFeedSpec: Asset feed specification (for dynamic creative) - urlTags: URL parameters to append to links - usePageActorOverride: Use page as actor Returns: The created creative with all fields.
metaads_list_imagesList ad images for an ad account. Returns a paginated list of uploaded images with their hashes and URLs. Args: - accountId: The ad account ID (required) - limit: Number of images to return (1-100, default: 25) - after: Pagination cursor for next page - hashes: Filter by specific image hashes (array) - format: Response format ('json' or 'markdown') Returns: List of images with hash, url, dimensions, etc.
metaads_list_videosList ad videos for an ad account. Returns a paginated list of uploaded videos. Args: - accountId: The ad account ID (required) - limit: Number of videos to return (1-100, default: 25) - after: Pagination cursor for next page - format: Response format ('json' or 'markdown') Returns: List of videos with id, title, description, thumbnail, status, etc.
metaads_get_videoGet details for a specific ad video. Args: - videoId: The video ID (required) - format: Response format ('json' or 'markdown') Returns: Video details including title, description, thumbnail, status, length, etc.
metaads_get_account_insightsGet insights (performance metrics) for an ad account. Returns performance data like impressions, clicks, spend, conversions, etc. Args: - accountId: The ad account ID (required) - datePreset: Date range preset (e.g., 'last_7d', 'last_30d', 'this_month') - timeRange: Custom time range { since: 'YYYY-MM-DD', until: 'YYYY-MM-DD' } - timeIncrement: Break down by time period ('1', '7', '28', 'monthly', 'all_days') - fields: Array of metrics to return - breakdowns: Array of dimensions to break down by (age, gender, country, etc.) - actionBreakdowns: Array of action breakdowns - attributionWindows: Attribution windows (1d_click, 7d_click, etc.) - level: Aggregation level ('account', 'campaign', 'adset', 'ad') - limit: Maximum number of results - format: Response format ('json' or 'markdown') Returns: Array of insights with requested metrics and breakdowns.
metaads_get_campaign_insightsGet insights (performance metrics) for a specific campaign. Args: - campaignId: The campaign ID (required) - datePreset: Date range preset - timeRange: Custom time range { since: 'YYYY-MM-DD', until: 'YYYY-MM-DD' } - timeIncrement: Time increment for breakdown - fields: Array of metrics to return - breakdowns: Array of dimensions to break down by - format: Response format Returns: Array of insights for the campaign.
metaads_get_adset_insightsGet insights (performance metrics) for a specific ad set. Args: - adSetId: The ad set ID (required) - datePreset: Date range preset - timeRange: Custom time range - timeIncrement: Time increment - fields: Array of metrics to return - breakdowns: Array of dimensions to break down by - format: Response format Returns: Array of insights for the ad set.
metaads_get_ad_insightsGet insights (performance metrics) for a specific ad. Args: - adId: The ad ID (required) - datePreset: Date range preset - timeRange: Custom time range - timeIncrement: Time increment - fields: Array of metrics to return - breakdowns: Array of dimensions to break down by - format: Response format Returns: Array of insights for the ad.
metaads_list_pixelsList Meta Pixels for an ad account. Returns a paginated list of pixels with their configuration and status. Args: - accountId: The ad account ID (required) - limit: Number of pixels to return (1-100, default: 25) - after: Pagination cursor for next page - fields: Comma-separated list of fields to return - format: Response format ('json' or 'markdown') Returns: List of pixels with id, name, code, last_fired_time, etc.
metaads_get_pixelGet details for a specific Meta Pixel. Args: - pixelId: The pixel ID (required) - fields: Comma-separated list of fields to return - format: Response format ('json' or 'markdown') Returns: Pixel details including name, code, settings, last_fired_time, owner, etc.
metaads_create_pixelCreate a new Meta Pixel. Creates a new pixel for tracking website conversions. Args: - accountId: The ad account ID (required) - name: Pixel name (required) Returns: The created pixel with id, name, and installation code.
metaads_search_targetingSearch for targeting options like interests, behaviors, demographics. Search for available targeting options that can be used in ad sets. Types: - adinterest: Search for interests - adinterestsuggestion: Get interest suggestions - adTargetingCategory: Browse targeting categories - adgeolocation: Search for locations - adlocale: Search for languages - adeducationschool: Search for schools - adworkemployer: Search for employers - adworkposition: Search for job titles Args: - accountId: The ad account ID (required) - type: Type of targeting to search (required) - query: Search query (required) - format: Response format ('json' or 'markdown') Returns: List of targeting options with id, name, type, and audience size estimates.
metaads_get_targeting_categoriesBrowse available targeting categories. Get a list of available targeting categories for a given type. Args: - accountId: The ad account ID (required) - type: Type of targeting categories (required) - format: Response format ('json' or 'markdown') Returns: List of targeting categories with id, name, and type.
metaads_get_delivery_estimateGet estimated delivery for a targeting specification. Estimate the potential reach for a given targeting configuration. Args: - accountId: The ad account ID (required) - targeting: Targeting specification (required) - JSON object with: - geo_locations: { countries: ['US'] } - age_min: Minimum age - age_max: Maximum age - genders: [1] male, [2] female - interests: [{ id: '123', name: 'Interest' }] - etc. - optimizationGoal: Optimization goal (required) - e.g., 'LINK_CLICKS', 'IMPRESSIONS', 'CONVERSIONS' - format: Response format ('json' or 'markdown') Returns: Delivery estimate with estimated daily reach, impressions, and audience size.
metaads_get_reach_frequencyGet a reach and frequency prediction. Retrieve an existing reach and frequency prediction. Args: - accountId: The ad account ID (required) - predictionId: The prediction ID (required) - format: Response format ('json' or 'markdown') Returns: Reach and frequency prediction with curves and estimates.
metaads_create_reach_frequencyCreate a reach and frequency prediction. Create a new reach and frequency prediction for planning purposes. Args: - accountId: The ad account ID (required) - targetSpec: Targeting specification (required) - startTime: Campaign start time (required, Unix timestamp) - stopTime: Campaign stop time (required, Unix timestamp) - objective: Campaign objective (required) - reachFrequency: Budget or reach goal (required) - one of: - { budget: amount_in_cents } - { reach: number_of_people } - frequencyCap: Maximum frequency cap - format: Response format ('json' or 'markdown') Returns: Created prediction with reach and frequency curves.
metaads_delete_audience{
"audienceId": "example_audienceId"
}metaads_list_ad_accounts{
"after": "example_after",
"limit": true,
"fields": "example_fields",
"format": "example_format"
}metaads_get_ad_account{
"fields": "example_fields",
"format": "example_format",
"accountId": "example_accountId"
}