MMetadata /docs
Docs/Tools/remove_keywords_from_campaign

remove_keywords_from_campaign

Remove Google Ads keyword groups and/or negative keyword list attachments from a campaign's GOOGLE_ADS channel.

Destructive search

Deletes, archives, launches or moves budget. Do not give an agent this one without a human gate.

What it does

Remove 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.

Arguments

ArgumentTypeNotes
campaign_id integer required The unique identifier of the campaign
channel_id integer 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.
channel_keywords object 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 object 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"]}

Request

curl
curl -s -X POST https://mcp-server.metadata.io/mcp \
  -H "Authorization: $METADATA_PAT" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "MCP-Protocol-Version: 2025-11-25" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"remove_keywords_from_campaign","arguments":{"campaign_id":0}}}'

Response

No recorded response. This tool can delete, archive, launch or move budget, so it is never executed to build these docs. The request above is still the exact shape to send. Nothing on this page is invented.

Other search tools:

All 160 tools · machine-readable index