Remove Keywords from Campaign
remove_keywords_from_campaignRemove Google Ads keyword groups and/or negative keyword list attachments from a campaign's GOOGLE_ADS channel.
Use this tool to clear keywords/negative lists from a DRAFT campaign so the
user can replace them with new ones (e.g. "I don't like these keywords, use
these instead" — call this tool to remove the old set, then call
add_and_edit_campaign_elements with the new google.keywords / google.negative_keyword_lists).
Works on both campaign structures. On a Channel-First / Native (N×N×N) campaign a
positive keyword group is also unlinked from its WizNativeAdContainer (keywordGroupId);
negative-list detach is channel-level and unchanged.
KEYWORDS: remove, delete, keyword, keywords, negative, group, google, campaign
PLATFORM CONSTRAINT:
- Only the Draft state allows keyword removal; the platform rejects DELETE on launched/launching campaigns.
CHANNEL: GOOGLE_ADS only (other channels do not have keyword groups).
RESPONSE:
- Returns the refreshed campaign state plus a removal_results list with one
{channel, keyword_group|negative_keyword_list, success, message|error} entry per
requested removal. ALWAYS check removal_results — a partial failure (e.g. one of
two group names not found) still returns normally.
- If EVERY requested removal failed, the tool errors instead of returning.
REQUIRED:
- campaign_id: Campaign ID (numeric identifier)
- At least one of channel_keywords OR channel_negative_keyword_lists must be provided.
OPTIONAL FAST PATH:
- channel_id: When you already have the GOOGLE_ADS channel id in context (e.g. from a recent get_campaign_by_wizard_id call), pass it to skip the full-campaign lookup. The tool will fetch only that single channel.
EXAMPLES:
Remove one keyword group:
remove_keywords_from_campaign({
"campaign_id": 42546,
"channel_keywords": {
"GOOGLE_ADS": ["CRM Keywords"]
}
})
Remove a negative keyword list attachment:
remove_keywords_from_campaign({
"campaign_id": 42546,
"channel_negative_keyword_lists": {
"GOOGLE_ADS": ["Competitor Brands"]
}
})
Remove both at once:
remove_keywords_from_campaign({
"campaign_id": 42546,
"channel_keywords": {"GOOGLE_ADS": ["CRM Keywords", "Demo Keywords"]},
"channel_negative_keyword_lists": {"GOOGLE_ADS": ["Competitor Brands"]}
})
Remove with known channel id (skips campaign lookup):
remove_keywords_from_campaign({
"campaign_id": 42546,
"channel_id": 88123,
"channel_keywords": {"GOOGLE_ADS": ["CRM Keywords"]}
})
INTEGRATION WITH OTHER TOOLS:
- Use get_campaign_by_wizard_id to inspect current keyword groups on a channel before removing.
- After removal, use add_and_edit_campaign_elements with google.keywords / google.negative_keyword_lists to add replacements.Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channel_id | No | Optional fast-path: numeric id of the GOOGLE_ADS channel on this campaign. When provided, the tool skips the full-campaign GET and fetches only this channel's keyword list. Use it when you already have the id from a recent campaign read; omit it and the tool resolves the channel by type. | |
| campaign_id | Yes | The unique identifier of the campaign | |
| channel_keywords | No | Map of channel type to list of positive keyword group names to remove. Only GOOGLE_ADS is supported. Example: {"GOOGLE_ADS": ["CRM Keywords"]} | |
| channel_negative_keyword_lists | No | Map of channel type to list of negative keyword list names to detach from the channel. Only GOOGLE_ADS is supported. Example: {"GOOGLE_ADS": ["Competitor Brands"]} |