Add locations to an X Ads ad group
x_ads_add_locationsAdd location targeting to an existing X Ads ad group (targeting values from x_ads_search_locations). On an ad group with no locations this narrows it from worldwide and runs directly; on a running ad group that already targets locations it widens reach, so the first call returns a preview and it runs only with confirm=true after the user agrees.
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": "<campaign>",
"ad_group": "<ad_group>",
"locations": "<locations>"
},
"name": "x_ads_add_locations"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| folder | No | Client folder name. | |
| account | No | X Ads account name or ID. Optional when only one is enabled. | |
| confirm | No | ||
| ad_group | Yes | Ad group (line item) name or ID. | |
| campaign | Yes | Campaign name or ID. | |
| language | No | Language of the card: the language the user is writing in. | |
| locations | Yes |