Create Ad Sets (batch)
adsap_create_ad_setsCreate one or more Meta ad sets under an existing campaign. Supports batch creation (max 20). Ad sets are created PAUSED by default. Detailed targeting: use targeting.flexible_spec groups (OR inside a group, AND between groups, like Ads Manager's Narrow audience) with ids and types from adsap_search_detailed_targeting. Leads campaigns take three destinations: ON_AD (Instant Forms), WEBSITE, and WEBSITE_AND_LEAD_FORM (Website and Instant Forms: OFFSITE_CONVERSIONS + pixel, ads then carry a link and a lead form). Not supported yet (say so and point the user to Meta Ads Manager, never substitute another destination): Messenger and Instagram Direct ad sets, calls, event responses, reminders, shop destinations. WhatsApp ad sets ARE supported: destination_type WHATSAPP with optimization_goal CONVERSATIONS on traffic, engagement, leads or sales campaigns (LINK_CLICKS also works except on leads), plus the page_id of a Facebook Page whose primary WhatsApp number is a WhatsApp Business account; ads in them need no link. ALWAYS call with dry_run: true first: it validates and renders a launch review card where the user confirms, creates (paused) and activates in-card — after it renders, reply with ONE short sentence and stop; do not call the real create from chat unless the user explicitly asks in a new message and the card's activity log shows nothing was created there. Prerequisites: call list_meta_assets for pages/pixels/Instagram accounts, list_pixel_events for conversion events. For App promotion (OUTCOME_APP_PROMOTION) campaigns: each ad set requires promoted_object.application_id + object_store_url, optimization_goal APP_INSTALLS (or OFFSITE_CONVERSIONS with custom_event_type for app-event optimization), and the promoted app must be in Live mode and advertisable by the ad account; OS targeting (user_os) is derived automatically from the store URL. Saved audiences that target specific devices: on a Sales ad set Adsap keeps delivery to those devices; pass reach_more_devices: true only when the user asks for Meta's "Reach more people across other mobile devices".
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"campaign_id": "<campaign_id>",
"ad_sets": "<ad_sets>"
},
"name": "adsap_create_ad_sets"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ad_sets | Yes | Array of ad set definitions. Max 20 per call. | |
| dry_run | No | When true, validates without creating. Default false. | |
| campaign_id | Yes | Parent campaign ID. Call list_campaigns first if needed. | |
| ad_account_id | No | Target ad account. Defaults to user's primary account. | |
| idempotency_key | No | Unique key to prevent duplicate creation from retries. | |
| campaign_objective | No | Parent campaign's objective. Pass it (e.g. from adsap_create_campaign's response) when the campaign was created recently and may not be cached yet. If omitted, resolved from cache; an unresolvable objective fails with guidance. |