Skip to main content
Glama

Update an ad set (TikTok ad group, LinkedIn campaign)

ads_update_ad_group
Idempotent

Meta: change an ad set's name, budget (whole currency units, the same daily or lifetime type it has), bid (strategy lowest_cost, bid_cap or cost_cap with amount, or min_roas with roasFloor), startDate, endDate or targeting (replaces the whole spec). TikTok: an ad group's daily budget (at least 20 USD), end date or name. LinkedIn: a campaign's daily budget (at least 10 USD), end date or name. Raising a budget or bid on a running ad set spends more real money: confirm the new amount with the user first. Meta changes are paced and limited so the ad account does not look automated: on ads_change_limited, wait retryAfterSeconds before retrying; on confirmation_required, confirm the new budget with the user and retry with confirmLargeChange true.

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": {
      "adAccountId": "<adAccountId>",
      "adGroupId": "<adGroupId>"
    },
    "name": "ads_update_ad_group"
  }
}

Input Schema

NameRequiredDescriptionDefault
bidNoMeta.
nameNo
budgetNoMeta.
endDateNo
platformNometa_ads, tiktok_ads or linkedin_ads. Needed only when the profile has more than one ad network and no accountId is given.
accountIdNoThe Facebook accountId from list_accounts. Without it, pass profileId to use that profile's Facebook connection.
adGroupIdYesAn ad set or ad group id from ads_get_tree (an entry in adSets).
profileIdNoA profileId from list_profiles. Optional when accountId is given, which names its profile; if both are given they must agree.
startDateNoMeta.
targetingNoMeta: replaces the ad set's whole targeting.
adAccountIdYes
dailyBudgetNoTikTok and LinkedIn.
confirmLargeChangeNoMeta: the user confirmed a budget increase of more than 50%.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / confirmLargeChange
      Added value: +{
      +  "description": "Meta: the user confirmed a budget increase of more than 50%.",
      +  "type": "boolean"
      +}
  2. Changed7 schema fields changed
    • changedInput schema / properties / adAccountId / pattern
      Previous value: -"^\\d+$"New value: +"^(act_)?\\d+$"
    • changedInput schema / properties / adGroupId / description
      Previous value: -"An ad group id from ads_get_tree (an entry in adSets)."New value: +"An ad set or ad group id from ads_get_tree (an entry in adSets)."
    • addedInput schema / properties / bid
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Meta.",
      +  "properties": {
      +    "amount": {
      +      "exclusiveMinimum": 0,
      +      "maximum": 10000,
      +      "type": "number"
      +    },
      +    "roasFloor": {
      +      "exclusiveMinimum": 0,
      +      "maximum": 1000,
      +      "type": "number"
      +    },
      +    "strategy": {
      +      "enum": [
      +        "lowest_cost",
      +        "bid_cap",
      +        "cost_cap",
      +        "min_roas"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "strategy"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / properties / budget
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Meta.",
      +  "properties": {
      +    "amount": {
      +      "exclusiveMinimum": 0,
      +      "maximum": 1000000,
      +      "type": "number"
      +    },
      +    "type": {
      +      "enum": [
      +        "daily",
      +        "lifetime"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "type",
      +    "amount"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / properties / dailyBudget / description
      Added value: +"TikTok and LinkedIn."
    • addedInput schema / properties / startDate
      Added value: +{
      +  "description": "Meta.",
      +  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
      +  "type": "string"
      +}
    • addedInput schema / properties / targeting
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Meta: replaces the ad set's whole targeting.",
      +  "properties": {
      +    "advantageAudience": {
      +      "default": false,
      +      "type": "boolean"
      +    },
      +    "ageMax": {
      +      "maximum": 65,
      +      "minimum": 13,
      +      "type": "integer"
      +    },
      +    "ageMin": {
      +      "maximum": 65,
      +      "minimum": 13,
      +      "type": "integer"
      +    },
      +    "behaviors": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "id": {
      +            "pattern": "^\\d+$",
      +            "type": "string"
      +          },
      +          "name": {
      +            "maxLength": 200,
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "id"
      +        ],
      +        "type": "object"
      +      },
      +      "maxItems": 200,
      +      "type": "array"
      +    },
      +    "customAudiences": {
      +      "items": {
      +        "pattern": "^\\d+$",
      +        "type": "string"
      +      },
      +      "maxItems": 100,
      +      "type": "array"
      +    },
      +    "demographics": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "id": {
      +            "pattern": "^\\d+$",
      +            "type": "string"
      +          },
      +          "name": {
      +            "maxLength": 200,
      +            "type": "string"
      +          },
      +          "type": {
      +            "enum": [
      +              "life_events",
      +              "family_statuses",
      +              "industries",
      +              "income",
      +              "education_statuses",
      +              "relationship_statuses",
      +              "work_positions",
      +              "work_employers",
      +              "education_schools",
      +              "education_majors",
      +              "user_adclusters"
      +            ],
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "id",
      +          "type"
      +        ],
      +        "type": "object"
      +      },
      +      "maxItems": 200,
      +      "type": "array"
      +    },
      +    "excludedCustomAudiences": {
      +      "items": {
      +        "pattern": "^\\d+$",
      +        "type": "string"
      +      },
      +      "maxItems": 100,
      +      "type": "array"
      +    },
      +    "excludedLocations": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "cities": {
      +          "items": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "distanceUnit": {
      +                "enum": [
      +                  "mile",
      +                  "kilometer"
      +                ],
      +                "type": "string"
      +              },
      +              "key": {
      +                "maxLength": 100,
      +                "minLength": 1,
      +                "type": "string"
      +              },
      +              "radius": {
      +                "maximum": 80,
      +                "minimum": 1,
      +                "type": "integer"
      +              }
      +            },
      +            "required": [
      +              "key"
      +            ],
      +            "type": "object"
      +          },
      +          "maxItems": 250,
      +          "type": "array"
      +        },
      +        "countries": {
      +          "items": {
      +            "pattern": "^[A-Z]{2}$",
      +            "type": "string"
      +          },
      +          "maxItems": 250,
      +          "type": "array"
      +        },
      +        "regions": {
      +          "items": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "key": {
      +                "maxLength": 100,
      +                "minLength": 1,
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "key"
      +            ],
      +            "type": "object"
      +          },
      +          "maxItems": 200,
      +          "type": "array"
      +        },
      +        "zips": {
      +          "items": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "key": {
      +                "maxLength": 100,
      +                "minLength": 1,
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "key"
      +            ],
      +            "type": "object"
      +          },
      +          "maxItems": 2500,
      +          "type": "array"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "gender": {
      +      "default": "all",
      +      "enum": [
      +        "all",
      +        "male",
      +        "female"
      +      ],
      +      "type": "string"
      +    },
      +    "interests": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "id": {
      +            "pattern": "^\\d+$",
      +            "type": "string"
      +          },
      +          "name": {
      +            "maxLength": 200,
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "id"
      +        ],
      +        "type": "object"
      +      },
      +      "maxItems": 200,
      +      "type": "array"
      +    },
      +    "languages": {
      +      "items": {
      +        "exclusiveMinimum": 0,
      +        "maximum": 9007199254740991,
      +        "type": "integer"
      +      },
      +      "maxItems": 50,
      +      "type": "array"
      +    },
      +    "locations": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "cities": {
      +          "items": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "distanceUnit": {
      +                "enum": [
      +                  "mile",
      +                  "kilometer"
      +                ],
      +                "type": "string"
      +              },
      +              "key": {
      +                "maxLength": 100,
      +                "minLength": 1,
      +                "type": "string"
      +              },
      +              "radius": {
      +                "maximum": 80,
      +                "minimum": 1,
      +                "type": "integer"
      +              }
      +            },
      +            "required": [
      +              "key"
      +            ],
      +            "type": "object"
      +          },
      +          "maxItems": 250,
      +          "type": "array"
      +        },
      +        "countries": {
      +          "items": {
      +            "pattern": "^[A-Z]{2}$",
      +            "type": "string"
      +          },
      +          "maxItems": 250,
      +          "type": "array"
      +        },
      +        "regions": {
      +          "items": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "key": {
      +                "maxLength": 100,
      +                "minLength": 1,
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "key"
      +            ],
      +            "type": "object"
      +          },
      +          "maxItems": 200,
      +          "type": "array"
      +        },
      +        "zips": {
      +          "items": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "key": {
      +                "maxLength": 100,
      +                "minLength": 1,
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "key"
      +            ],
      +            "type": "object"
      +          },
      +          "maxItems": 2500,
      +          "type": "array"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "placements": {
      +      "anyOf": [
      +        {
      +          "const": "automatic",
      +          "type": "string"
      +        },
      +        {
      +          "additionalProperties": false,
      +          "properties": {
      +            "audienceNetworkPositions": {
      +              "items": {
      +                "enum": [
      +                  "classic",
      +                  "rewarded_video"
      +                ],
      +                "type": "string"
      +              },
      +              "type": "array"
      +            },
      +            "devicePlatforms": {
      +              "items": {
      +                "enum": [
      +                  "mobile",
      +                  "desktop"
      +                ],
      +                "type": "string"
      +              },
      +              "type": "array"
      +            },
      +            "facebookPositions": {
      +              "items": {
      +                "enum": [
      +                  "feed",
      +                  "right_hand_column",
      +                  "marketplace",
      +                  "video_feeds",
      +                  "story",
      +                  "search",
      +                  "instream_video",
      +                  "facebook_reels",
      +                  "facebook_reels_overlay",
      +                  "profile_feed",
      +                  "notification"
      +                ],
      +                "type": "string"
      +              },
      +              "type": "array"
      +            },
      +            "instagramPositions": {
      +              "items": {
      +                "enum": [
      +                  "stream",
      +                  "story",
      +                  "explore",
      +                  "explore_home",
      +                  "reels",
      +                  "profile_feed",
      +                  "ig_search",
      +                  "profile_reels"
      +                ],
      +                "type": "string"
      +              },
      +              "type": "array"
      +            },
      +            "messengerPositions": {
      +              "items": {
      +                "enum": [
      +                  "messenger_home",
      +                  "sponsored_messages",
      +                  "story"
      +                ],
      +                "type": "string"
      +              },
      +              "type": "array"
      +            },
      +            "publisherPlatforms": {
      +              "items": {
      +                "enum": [
      +                  "facebook",
      +                  "instagram",
      +                  "audience_network",
      +                  "messenger",
      +                  "threads"
      +                ],
      +                "type": "string"
      +              },
      +              "minItems": 1,
      +              "type": "array"
      +            }
      +          },
      +          "required": [
      +            "publisherPlatforms"
      +          ],
      +          "type": "object"
      +        }
      +      ],
      +      "default": "automatic"
      +    }
      +  },
      +  "required": [
      +    "locations"
      +  ],
      +  "type": "object"
      +}
  3. Changed2 schema fields changed
    • changedInput schema / properties / platform / description
      Previous value: -"meta_ads or tiktok_ads. Needed only when the profile has both ad networks and no accountId is given."New value: +"meta_ads, tiktok_ads or linkedin_ads. Needed only when the profile has more than one ad network and no accountId is given."
    • changedInput schema / properties / platform / enum
      Previous value: -[
      -  "meta_ads",
      -  "tiktok_ads"
      -]New value: +[
      +  "meta_ads",
      +  "tiktok_ads",
      +  "linkedin_ads"
      +]
  4. Added

TDQS

A4.1/5.0
Behavior4/5

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

Beyond the annotations, the description discloses real-money consequences of budget/bid increases, Meta's pacing/limiting behavior, the ads_change_limited error with retryAfterSeconds, and the confirmLargeChange escape hatch. It does not say whether unspecified fields are left untouched (partial update) or what a successful response contains.

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?

Three platform-scoped chunks with the money-risk warning and error-handling guidance placed after the field list; dense but each clause carries information. The long comma-chained Meta sentence is slightly harder to scan than it needs to be.

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

Completeness4/5

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

For a 13-parameter mutation tool with nested targeting, no output schema and open-world annotations, the description covers the high-risk behaviors (spend, throttling, confirmation) well. It leaves partial-update semantics and response shape unstated, which keeps it short of complete.

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?

With 77% schema coverage the schema already documents most parameters, yet the description adds genuine meaning: budget amounts are whole currency units and must keep the existing daily/lifetime type, bid strategies map to amount vs roasFloor, targeting replaces the whole spec, and it supplies the TikTok 20 USD / LinkedIn 10 USD daily minimums and the >50% definition of a large change.

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 (change/update) and resource (ad set / TikTok ad group / LinkedIn campaign) and enumerates the exact editable fields per platform, which immediately separates it from ads_update_campaign, ads_set_status and the delete siblings.

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

Usage Guidelines3/5

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

It gives clear conditions for confirmation before raising budgets/bids and for handling confirmation_required, but never states when to prefer ads_update_campaign or ads_set_status instead, and there is no explicit when-not guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources