Skip to main content
Glama

meta_ads_excluded_placements_set

Sets an ad set's delivery-surface exclusions by replacing specified facets while preserving other targeting, so you can control Audience Network and brand-safety blocking.

Instructions

Sets one ad set's delivery-surface exclusions. Returns ad_set_id, the applied facets, and Meta's update result. Mutating and delivery-affecting — excluding too much can take an ad set to zero delivery. Each supplied facet REPLACES its current value (Meta has no append here); an omitted facet is left untouched. The rest of the targeting spec (geo, audiences, interests) is preserved by a read-modify-write merge. Recorded in STATE.json's action_log with an observation window and reversible via rollback_apply, which restores the prior lists.

Input Schema

NameRequiredDescriptionDefault
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.
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.
ad_set_idYesAd set ID whose exclusions to read or write (e.g. '23851234567890123'). Exclusions live on the ad set, not on the campaign — set them per ad set.
account_idNoAd account ID in 'act_XXXXXXXXXX' form. Optional — falls back to META_ADS_ACCOUNT_ID from the configured credentials.
decision_idNoA proposed decision this change carries out.
excluded_publisher_list_idsNoComplete new value for targeting.excluded_publisher_list_ids — numeric ids of Audience Network publisher block lists to apply. Replaces the current list; an empty array clears the facet.
excluded_publisher_categoriesNoComplete new value for targeting.excluded_publisher_categories — Audience Network publisher/app categories to exclude. Replaces the current list rather than appending, so read the current value with meta_ads_excluded_placements_get first and send the full intended set. An empty array clears the facet.
excluded_brand_safety_content_typesNoComplete new value for targeting.excluded_brand_safety_content_types — content types to exclude. Replaces the current list; an empty array clears the facet.

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. Addedv0.10.44

TDQS

A4.6/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full burden, and it does: it discloses mutation, delivery impact ('excluding too much can take an ad set to zero delivery'), replace-not-append semantics, preservation of the rest of the targeting spec via read-modify-write merge, journaling into STATE.json's action_log, and reversibility through rollback_apply. It also states the return payload, which matters absent an output schema.

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

Conciseness4/5

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

Front-loaded with verb, resource, and return shape, then risk warning, then merge/replace semantics, then audit/reversibility. Every sentence carries information, though the density is high for five sentences and the risk warning could sit closer to the replace rule it qualifies.

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 destructive, delivery-affecting mutation with no annotations and no output schema, the description covers what changes, what is preserved, what is returned, how it is logged, and how to undo it. Nothing an agent needs before invoking is absent.

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 baseline is 3; the description earns above baseline by explaining replace semantics ('Each supplied facet REPLACES its current value... an omitted facet is left untouched'), which is the single most error-prone aspect of these three list parameters. It does not add hints about ad_set_id/account_id resolution, but the schema already documents those.

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?

States a specific verb and resource with scope: 'Sets one ad set's delivery-surface exclusions.' It also pins the object level ('on the ad set, not on the campaign' via the schema) and implicitly contrasts with the sibling meta_ads_excluded_placements_get. An agent can distinguish it from meta_ads_ad_sets_update without opening the schema.

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

Usage Guidelines4/5

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

Gives a clear context for use (mutating targeting facet, reversible via rollback_apply, journaled with an observation window) and a warning that over-excluding can zero out delivery. It does not name the read counterpart as an alternative in the description itself — that routing lives only in the parameter schema text ('read the current value with meta_ads_excluded_placements_get first') — so an explicit when-to-call-get-first rule in the description is the remaining gap.

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