Skip to main content
Glama

meta_ads_ad_sets_create

Creates a paused-by-default Meta ad set inside an existing campaign and returns its ID, accepting targeting, budget, and bid settings for controlled setup.

Instructions

Creates a new ad set inside an existing campaign. Returns the new ad_set id. Mutating — not automatically reversible; record before-state with mureo_state_action_log_append if you may need to roll back. Targeting is passed as a Meta targeting spec object; at minimum supply geo_locations and age bounds. Default initial status is PAUSED — only ACTIVE when the operator has confirmed spend. Since Marketing API v26.0, an ad set under a special-ad-category campaign (HOUSING, EMPLOYMENT, CREDIT, FINANCIAL_PRODUCTS_SERVICES) whose targeting is relaxable is rejected unless targeting.targeting_automation.advantage_audience is set to 1 or 0 — targeting is passed through as-is, so put it inside targeting. After creation, attach ads with meta_ads_ads_create.

Input Schema

NameRequiredDescriptionDefault
nameYesAd set name, up to 400 characters.
reasonNoWhy this change is being made: one or two sentences naming the evidence and the expected effect. Stored in the journal and on the action_log entry this call produces, for the operator and the next session.
statusNoInitial status. Default PAUSED. Only ACTIVE after operator sign-off.
approvalNoExternal approval this change carries out (recorded and shown, never verified)
expectedNoExpected effects [{metric, direction, target?, horizon_days?, primary?}], exactly one primary:true when several; metric cpa/cpc/cpl/cpm/conversions/cvr/ctr/roas/cost/spend/clicks/impressions; direction up/down/hold.
targetingNoMeta targeting spec. Typical keys: geo_locations (e.g. {'countries': ['JP']}), age_min, age_max, genders, interests, custom_audiences. See Meta Marketing API targeting docs for the full schema.
account_idNoMeta Ads account ID in the format 'act_XXXXXXXXXX' (e.g. 'act_1234567890'). Optional — falls back to META_ADS_ACCOUNT_ID from the configured credentials. The leading 'act_' prefix is required.
bid_amountNoBid cap in account currency minor units. Required when bid_strategy is LOWEST_COST_WITH_BID_CAP or COST_CAP. Omit for LOWEST_COST_WITHOUT_CAP (automatic bidding).
campaign_idYesParent campaign ID. Must exist and not be DELETED.
decision_idNoA proposed decision this change carries out.
bid_strategyNoBid strategy for automatic auction bidding. LOWEST_COST_WITHOUT_CAP is fully automatic (do NOT set bid_amount). LOWEST_COST_WITH_BID_CAP and COST_CAP both require a bid_amount on the ad set (the cap). LOWEST_COST_WITH_MIN_ROAS requires bid_constraints.roas_average_floor on the ad set. When set on the campaign, budgets typically live at the campaign (CBO) level; when set on the ad set, at the ad-set level.
daily_budgetNoDaily budget in account currency minor units (cents for USD, yen for JPY). Required unless the parent campaign uses CBO; mutually exclusive with lifetime-budget settings on the same ad set.
billing_eventNoWhat Meta charges for. Default IMPRESSIONS. The valid options depend on the optimization_goal — incompatible pairings are rejected by Meta.
bid_constraintsNoBid constraints object. Currently carries roas_average_floor for the LOWEST_COST_WITH_MIN_ROAS strategy.
promoted_objectNoConversion target for conversion optimization, e.g. {"pixel_id": "123", "custom_event_type": "LEAD"}. Required for conversion optimization (e.g. OUTCOME_LEADS + optimization_goal OFFSITE_CONVERSIONS optimizing to a pixel event).
optimization_goalNoWhat Meta optimises delivery for (e.g. REACH, LINK_CLICKS, OFFSITE_CONVERSIONS, LANDING_PAGE_VIEWS, THRUPLAY). Default REACH. Must be compatible with the parent campaign's objective.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.33.0
    • changedInput schema / properties / expected / description
      Previous value: -"Expected effects [{metric, direction, target?, horizon_days?}]; metric cpa/cpc/cpl/cpm/conversions/cvr/ctr/roas/cost/spend/clicks/impressions; direction up/down/hold."New value: +"Expected effects [{metric, direction, target?, horizon_days?, primary?}], exactly one primary:true when several; metric cpa/cpc/cpl/cpm/conversions/cvr/ctr/roas/cost/spend/clicks/impressions; direction up/down/hold."
  2. Changed1 schema field changedv0.28.0
    • addedInput schema / properties / approval
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "External approval this change carries out (recorded and shown, never verified)",
      +  "properties": {
      +    "approved_at": {
      +      "maxLength": 64,
      +      "type": "string"
      +    },
      +    "approved_by": {
      +      "maxLength": 80,
      +      "type": "string"
      +    },
      +    "reference": {
      +      "maxLength": 128,
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "reference",
      +    "approved_by",
      +    "approved_at"
      +  ],
      +  "type": "object"
      +}
  3. Changed2 schema fields changedv0.26.0
    • addedInput schema / properties / decision_id
      Added value: +{
      +  "description": "A proposed decision this change carries out.",
      +  "maxLength": 128,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / expected
      Added value: +{
      +  "description": "Expected effects [{metric, direction, target?, horizon_days?}]; metric cpa/cpc/cpl/cpm/conversions/cvr/ctr/roas/cost/spend/clicks/impressions; direction up/down/hold.",
      +  "maxItems": 12,
      +  "type": "array"
      +}
  4. Changed1 schema field changedv0.20.0
    • addedInput schema / properties / reason
      Added value: +{
      +  "description": "Why this change is being made: one or two sentences naming the evidence and the expected effect. Stored in the journal and on the action_log entry this call produces, for the operator and the next session.",
      +  "maxLength": 500,
      +  "type": "string"
      +}
  5. Changed5 schema fields changedv0.10.37
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / bid_amount / description
      Previous value: -"Bid cap in account currency minor units. Required for bid-strategy optimization goals such as LINK_CLICKS with TARGET_COST. Omit for automatic bidding."New value: +"Bid cap in account currency minor units. Required when bid_strategy is LOWEST_COST_WITH_BID_CAP or COST_CAP. Omit for LOWEST_COST_WITHOUT_CAP (automatic bidding)."
    • addedInput schema / properties / bid_constraints
      Added value: +{
      +  "description": "Bid constraints object. Currently carries roas_average_floor for the LOWEST_COST_WITH_MIN_ROAS strategy.",
      +  "properties": {
      +    "roas_average_floor": {
      +      "description": "Minimum average ROAS floor, scaled x10000 (e.g. a 1.2x ROAS target is 12000). Required when bid_strategy is LOWEST_COST_WITH_MIN_ROAS.",
      +      "minimum": 1,
      +      "type": "integer"
      +    }
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / bid_strategy
      Added value: +{
      +  "description": "Bid strategy for automatic auction bidding. LOWEST_COST_WITHOUT_CAP is fully automatic (do NOT set bid_amount). LOWEST_COST_WITH_BID_CAP and COST_CAP both require a bid_amount on the ad set (the cap). LOWEST_COST_WITH_MIN_ROAS requires bid_constraints.roas_average_floor on the ad set. When set on the campaign, budgets typically live at the campaign (CBO) level; when set on the ad set, at the ad-set level.",
      +  "enum": [
      +    "LOWEST_COST_WITHOUT_CAP",
      +    "LOWEST_COST_WITH_BID_CAP",
      +    "COST_CAP",
      +    "LOWEST_COST_WITH_MIN_ROAS"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / promoted_object
      Added value: +{
      +  "description": "Conversion target for conversion optimization, e.g. {\"pixel_id\": \"123\", \"custom_event_type\": \"LEAD\"}. Required for conversion optimization (e.g. OUTCOME_LEADS + optimization_goal OFFSITE_CONVERSIONS optimizing to a pixel event).",
      +  "properties": {
      +    "application_id": {
      +      "description": "App ID (for app-install / app-event optimization).",
      +      "type": "string"
      +    },
      +    "custom_conversion_id": {
      +      "description": "Custom Conversion ID to optimize toward.",
      +      "type": "string"
      +    },
      +    "custom_event_type": {
      +      "description": "Standard conversion event to optimize for. Common values: LEAD, PURCHASE, COMPLETE_REGISTRATION, ADD_TO_CART, INITIATED_CHECKOUT, CONTENT_VIEW. Graph accepts many values — passed through unchanged.",
      +      "type": "string"
      +    },
      +    "object_store_url": {
      +      "description": "App store URL (paired with application_id).",
      +      "type": "string"
      +    },
      +    "page_id": {
      +      "description": "Facebook Page ID (for page-based optimization goals).",
      +      "type": "string"
      +    },
      +    "pixel_id": {
      +      "description": "Meta Pixel ID to optimize conversions toward.",
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  6. Addedv0.9.12
  7. Removedv0.9.6
  8. Addedv0.9.2
  9. Removedv0.9.1
  10. Addedv1.0.5

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden and does so: it declares the call mutating and 'not automatically reversible', names the compensating journal tool, discloses the PAUSED default, and documents a versioned rejection rule (special-ad-category campaigns require targeting.targeting_automation.advantage_audience when targeting is relaxable). It also states targeting is passed through as-is, which tells the agent not to expect server-side repairs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose and return value, then hazards, then targeting/status requirements, then the next step. Every clause carries operational information (rollback journaling, default status, API version caveat) with no restatement of the title or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 16-parameter mutation with no output schema, the description covers the return value, reversibility, safe default, targeting minimums and a platform-version rejection rule; the remaining budget/bidding detail is fully documented in the schema at 100% coverage. Nothing an agent needs to call it safely is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description earns above that by adding constraints the schema does not state — the minimum targeting contents (geo_locations and age bounds) and the precise nesting point for advantage_audience inside targeting. It adds nothing about bid_strategy/bid_amount/daily_budget interactions, which remain schema-only.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb+resource pair ('Creates a new ad set inside an existing campaign') and states the return value ('Returns the new ad_set id'). It also names the adjacent sibling to use afterwards (meta_ads_ads_create), so an agent can separate creation from ad attachment and from the *_update/*_pause siblings without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit preconditions and defaults: initial status PAUSED 'only ACTIVE when the operator has confirmed spend', and record before-state with mureo_state_action_log_append if rollback may be needed. It also routes forward ('attach ads with meta_ads_ads_create') and states the minimum targeting required, leaving little to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools