Skip to main content
Glama

Delete an X Ads campaign, ad group or custom audience

x_ads_remove
Destructive

Permanently delete an X Ads campaign (with its ad groups), one ad group, or a custom audience (give audience instead of campaign; ad groups using it lose it). Requires the user's explicit yes: call first without confirm to preview, then with confirm=true and confirm_name equal to the exact name. Its history stays in reports.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "x_ads_remove"
  }
}

Input Schema

NameRequiredDescriptionDefault
folderNoClient folder name.
accountNoX Ads account name or ID. Optional when only one is enabled.
confirmNo
ad_groupNoOptional ad group name or ID; omit to delete the whole campaign.
audienceNoCustom audience name or ID (x_ads_audiences) to delete instead of a campaign.
campaignNoCampaign name or ID.
languageNoLanguage of the card: the language the user is writing in.
confirm_nameNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / audience
      Added value: +{
      +  "description": "Custom audience name or ID (x_ads_audiences) to delete instead of a campaign.",
      +  "type": "string"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "campaign"
      -]
  2. Added

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false and openWorldHint=true, so safety is covered; the description adds real value on top by disclosing the confirm/confirm_name preview gate, the cascade that ad groups are destroyed with a campaign, and that ad groups lose a deleted audience. It stops short of stating irreversibility of reports history — actually it does note history stays in reports — but does not cover auth scope or failure behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three dense sentences, front-loaded with what gets destroyed, then the confirm workflow, then the report-retention note. No filler or restatement of the title.

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?

For a destructive multi-mode deletion tool with eight loosely-required parameters and no output schema, the definition covers the destructive scope, the confirmation safety gate, and data side effects (reports retain history). Nothing material is missing to call it correctly.

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 75%, with confirm and confirm_name undescribed in the schema; the description fills that gap by explaining their exact semantics and the required interaction order. It also clarifies that audience substitutes for campaign. Minor gaps: folder, language, and ad_group/campaign ID-vs-name behavior are left to the schema.

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 names a specific destructive verb ("Permanently delete") and three precise resources (campaign with its ad groups, one ad group, custom audience), plus the cascade semantics (campaign deletion removes its ad groups). It also distinguishes the audience-deletion path, which maps to x_ads_audiences instead of x_ads_campaigns.

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

Usage Guidelines5/5

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

It gives an explicit two-step workflow — first call without confirm to preview, then confirm=true with confirm_name matching the exact name — and states which parameter selects which deletion mode ("give audience instead of campaign"). The only mild gap is that sibling tools like x_ads_set_status are not contrasted as non-destructive alternatives, but the when-to-use condition is otherwise complete.

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