gads_remove_campaign_criterion
Google Ads write medium risk
Part of the Google Ads Manager Agent.
What it does
Remove one or more campaign-level criteria by resource_name (locations, languages, ad schedules, proximity, demographics, negative keywords, devices, audiences). Issues remove operations against CampaignCriterionService. Returns removed resource_names and a readable confirmation of what targeting changed. Preview->approve->commit: resolves+describes each target (type + human detail) via a lookup, validate_only=true diff (campaign + what is removed + net serving effect), explicit approval, then commit (with preview_id) sends validate_only=false server-side + partial_failure=true + immutable audit log. Safety: removing a NEGATIVE keyword/exclusion re-opens traffic; removing an INCLUDED targeting criterion can broaden serving — the preview spells out the direction of change before any spend shift. Bulk supported up to the 10,000-op mutate cap. The preview shows what each criterion is (type, negative or not, its detail) and which way removing it moves serving; a value that is not a campaign criterion resource name is refused. PREVIEW SEMANTICS: the first call (no preview_id) is sent to the Google Ads API in validation mode — field, enum, policy and permission errors surface AT PREVIEW, nothing is changed, and the response returns a preview_id. To apply, show the preview to the user, get their approval, and re-call with that preview_id and IDENTICAL arguments within 30 minutes; changed arguments or an expired token fail closed to a fresh preview. validate_only=true forces another preview; validate_only=false alone never commits.
When to use it
Use when the user wants to delete a specific targeting criterion or negative (e.g. 'remove the California location' or 'delete the negative keyword cheap'). List criteria first to get exact resource_names, preview the net serving impact, and confirm before committing — removals shift real spend.
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
customer_id | string | yes | 10-digit CID, dashes/spaces stripped. Tenant context server-derived. |
criterion_resource_names | array<string> | yes | Full campaign_criterion resource_names (customers/{cid}/campaignCriteria/{campaign_id}~{criterion_id}). Discover via gads_list_campaign_criteria. Bulk supported up to the 10,000-op mutate cap. |
validate_only | boolean | no | Optional. true forces another preview even with a preview_id; false is DEPRECATED and no longer commits — only a valid preview_id applies the write. |
preview_id | string | no | Omit it to preview: nothing is applied, and the call returns a preview_id bound to this exact request. Pass it only after the user approves that preview in a later message, with the same arguments (leave out validate_only, and add any confirmation flag the preview names). Single-use, expires in 30 minutes; changed arguments need a fresh preview. |
Safeguards
A change in two steps. The first call previews and changes nothing; Claude shows you the preview and applies it only after you approve, within 30 minutes and with the same arguments. Every applied change goes to the audit log. How changes are approved.
Policy
Removing criteria must not be used to strip a required restriction (e.g. deleting an age/geo exclusion that keeps a restricted-vertical ad compliant) or to re-broadcast a disapproved ad. Confirm the removal doesn't re-enable non-compliant serving before committing.
Reminder
Criteria can encode sensitive targeting/negatives; confirm exactly what's removed and don't retain beyond this request.
Errors
| Error class | Means | What to do | Retry |
|---|---|---|---|
CUSTOMER_NOT_FOUND | Customer ID not found or not linked. | Verify CID (dashes stripped); re-auth if stale. | no |
TOKEN_REVOKED | Authorization revoked / refresh token expired. | Trigger re-auth (needs_reauth); do not retry with the dead token. | no |
CRITERION_NOT_FOUND | A resource_name doesn't exist or was already removed. | Re-list to refresh resource_names; treat already-removed as success-no-op, surface the rest. | no |
INVALID_ARGUMENT | Malformed resource_name or operation rejected. | Surface platform message; correct the resource_name. Do not guess IDs. | no |
PERMISSION_DENIED | Missing scope or read-only role. | Report missing scope / role; do not retry. | no |
MANAGER_ACCOUNT_WRITE | Target CID is a manager (MCC) account. | Ask which child serving account to target. | no |
TOO_MANY_MUTATE_OPERATIONS | More than 10,000 removals in one request. | Chunk into <=10,000-op batches and submit sequentially. | yes |
RESOURCE_EXHAUSTED | Rate/quota limit (HTTP 429). | Backoff 5->10->20s cap 60s, honor retryDelay; retry. | yes |
PARTIAL_FAILURE | Some removals failed, others succeeded. | Report per-resource; retry only failures. | no |
PLATFORM_UNAVAILABLE | Google Ads 5xx / INTERNAL / DEADLINE_EXCEEDED. | Idempotent retry with backoff. | yes |
Edge cases
- Empty list -> success:false 'nothing to remove'.
- Already-removed criterion -> idempotent success; count reflects actually-removed.
- Removing the sole proximity/location criterion broadens to no-geo-restriction -> warn of nationwide/all-geo serving.
- Removing the last negative keyword re-opens previously blocked queries -> note traffic resumption.
- Bulk >10,000 -> chunk to mutate cap.
- Expired token -> refresh once, retry.
- Preview expired before approval -> re-run validate_only before commit.