gads_remove_asset_group_asset
Google Ads write medium risk
Part of the Performance Max Agent.
What it does
Unlink an asset from a PMax asset group (remove the AssetGroupAsset) via AssetGroupAssetService.MutateAssetGroupAssets, without deleting the underlying asset. Returns {success, removed_resource_name, asset_still_in_library:true, field_type, remaining}. Accuracy: remaining counts the group's live links of that field type left after the removal (read before the preview); leaving fewer than the PMax minimum (3 headlines, 2 descriptions, 1 each of long headline / business name / marketing image / square marketing image / logo) carries a warning, and a Google refusal surfaces as a clear error, never a silent break. Flow: preview (validate_only=true) -> diff ('Unlink HEADLINE asset X from group Y; group will have N HEADLINE remaining') -> approval -> execute (partial_failure=true) -> confirm + immutable audit log. Idempotent on already-removed links: success with a note (changed: false) and no preview to approve. 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 to remove an underperforming or off-brand asset from a PMax group. Preview the remaining count per field type so the group stays above PMax minimums; never remove to circumvent enforcement.
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
customer_id | string | yes | 10-digit CID; strip dashes. |
asset_group_asset_resource_name | string | no | Exact AssetGroupAsset linkage resource. Provide this OR asset_group + asset + field_type. |
asset_group_resource_name | string | no | Group, used with asset + field_type to resolve. |
asset_resource_name | string | no | Asset to unlink. |
field_type | string | no | Field-type role for resolution. |
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 assets changes live cross-channel serving. Do not strip + re-add variants to evade a disapproval (Circumventing Systems = egregious). Apply only the approved removal.
Reminder
The underlying asset is preserved (only the group link is removed); account-isolated.
Errors
| Error class | Means | What to do | Retry |
|---|---|---|---|
ASSET_GROUP_ERROR_BELOW_MIN_ASSETS | Removal would drop the group below the required minimum for that field type. | Block; add a replacement first or keep the asset. | no |
INVALID_ARGUMENT | Insufficient identifiers to resolve the linkage. | Supply the linkage resource or group+asset+field_type. | no |
NOT_FOUND | No such link in the group (an already-removed link returns success, changed: false). | List the group's assets with gads_get_asset_group (assets_by_field_type) and re-call with the exact asset + field_type. | no |
TOKEN_REVOKED | Token revoked/expired. | Set needs_reauth; prompt reconnect. | no |
RESOURCE_EXHAUSTED | Quota/QPS exceeded (HTTP 429). | Backoff 5/10/20s cap 60s, retry once. | yes |
PARTIAL_FAILURE | Some removals failed in bulk. | Return per-op errors. | no |
PLATFORM_UNAVAILABLE | Backend 5xx/INTERNAL. | Retry once after backoff. | yes |
Edge cases
- Underlying asset never deleted — only the group link.
- Removing below the PMax minimum for its field type -> warning naming the remaining count; a Google refusal surfaces as a clear error.
- Already-removed link -> idempotent success.
- Removing the last LOGO/BUSINESS_NAME (non-brand-guidelines groups) blocks serving; warn.
- validate_only=true removes nothing; preview TTL expiry -> re-preview.