Skip to main content
Glama

Metadata MCP Connector

Remove Ad from Campaign

remove_ad_from_campaign
Destructive

Remove specific ads (ad groups) from one or more channels in an existing campaign.

            Use this tool when you need to detach a named ad from a particular channel
            (e.g. remove "Pixel Ads in Minutes_v2_LI" from LINKEDIN).
            Channel and ad group IDs are resolved internally — you only need the
            human-readable channel type and ad name.

            Works on both campaign structures. On a Channel-First / Native (N×N×N) campaign the
            ad is removed from its WizNativeAdContainer's native ads (resolved by ad name via the
            ads library); any container then left with no asset at all is dropped.

            KEYWORDS: remove, delete, ad, creative, ad group, channel, campaign

            WHEN TO USE:
            - User wants to remove a specific ad from a channel
            - User wants to clean up ad groups from one or more channels
            - Multiple ads across multiple channels can be removed in a single call

            RESPONSE:
            - Returns the refreshed campaign state plus a removal_results list with one
              entry per requested removal recording its success or error. ALWAYS check
              removal_results — a partial failure (e.g. one of two names not found) still
              returns normally, so report only what actually came back successful.

            REQUIRED PARAMETERS:
            - campaign_id: Campaign ID (numeric identifier)
            - channel_ads: Object mapping channel type → list of ad names to remove

            CHANNEL TYPES: FACEBOOK, INSTAGRAM, GOOGLE_ADS, LINKEDIN, MICROSOFT_ADS, REDDIT, TWITTER

            EXAMPLES:

            Remove one ad from LINKEDIN:
            remove_ad_from_campaign({
                "campaign_id": 42546,
                "channel_ads": {
                    "LINKEDIN": ["Pixel Ads in Minutes_v2_LI"]
                }
            })

            Remove ads from multiple channels at once:
            remove_ad_from_campaign({
                "campaign_id": 42546,
                "channel_ads": {
                    "LINKEDIN": ["Ad A", "Ad B"],
                    "FACEBOOK": ["Ad C"]
                }
            })

            INTEGRATION WITH OTHER TOOLS:
            - Use get_campaign_by_wizard_id to inspect current ads per channel before removing
            - Use search_campaigns_by_names to find the campaign ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
campaign_idYesThe unique identifier of the campaign
channel_adsYesMap of channel type to list of ad names to remove. Example: {"LINKEDIN": ["Ad A"], "FACEBOOK": ["Ad B"]}

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already indicate destructiveHint=true, and the description reinforces and expands on this by explaining internally resolved IDs, the dropping of empty containers on Channel-First campaigns, and the removal_results list with per-attempt success or error. It also warns that partial failures return normally and advises checking results. This is valuable behavioral context beyond what annotations provide.

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?

The description is front-loaded with the core purpose and then uses clearly labeled sections for usage, response, parameters, examples, and integration. It is longer than average, but the complexity of partial failures and campaign-structure nuances justifies the length. The KEYWORDS block is mildly redundant, but most content earns its place.

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?

Given the nested parameter, two campaign structures, partial-failure behavior, and absence of an output schema, the description covers all necessary ground. The RESPONSE section clearly explains what is returned and how to interpret removal_results. Channel type enumeration and integration guidance make the tool callable correctly without additional lookups.

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 the baseline is 3. The description adds meaning by listing required parameters, enumerating supported channel types, and clarifying that ad names are human-readable while IDs are resolved internally. The two examples also clarify the exact shape of the nested channel_ads object, which helps an agent construct valid calls.

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?

The description uses a specific verb and resource: remove specific ads (ad groups) from one or more channels in an existing campaign. It clearly distinguishes this from siblings like remove_channels_from_campaign and remove_audiences_from_campaign by naming the exact target. The first sentence alone is enough for an agent to know what this tool does.

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?

The description includes a dedicated WHEN TO USE section with concrete scenarios: removing a specific ad from a channel, cleaning up ad groups, and removing multiple ads across channels in one call. It also names companion tools like get_campaign_by_wizard_id and search_campaigns_by_names. However, it does not explicitly contrast with archive_ad/unarchive_ad or other remove_* tools, so it stops short of a 5.

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