Skip to main content
Glama

Google Ads: remove location targets

remove_geo_targets
DestructiveIdempotent

Takes location targets back out of a campaign.

The inverse of set_geo_targets. location_ids are targeted locations to
stop targeting; excluded_location_ids are exclusions to lift, so the
campaign can show there again; radius_criterion_ids are radius targets
to remove, by their criterion ID. Only the campaign's location and
radius targets are looked at: its languages, devices, ad schedule,
keywords and every other setting are never changed. A location the
campaign does not have is reported in not_found and nothing is done for
it; when none is found, nothing is sent. A Video campaign is refused
before anything is sent: the Google Ads API cannot change Video
campaigns, so its locations are changed in Google Ads.

A campaign with no targeted location or radius serves in every
location. Removing the last one is therefore refused unless
serve_everywhere is True. To move a campaign from one place to another,
add the new place with set_geo_targets first, then remove the old one.

Read the campaign's location targets with search: resource
campaign_criterion, fields campaign_criterion.criterion_id,
campaign_criterion.type, campaign_criterion.negative,
campaign_criterion.location.geo_target_constant,
campaign_criterion.proximity.radius,
campaign_criterion.proximity.radius_units,
campaign_criterion.proximity.address.city_name, conditions campaign.id =
<campaign_id>, campaign_criterion.type IN ('LOCATION', 'PROXIMITY'),
campaign_criterion.status != 'REMOVED'.

Args:
    customer_id: The Google Ads customer ID (numbers only, no hyphens).
    campaign_id: The ID of the campaign (digits only).
    location_ids: Geo target constant IDs the campaign targets, to stop
        targeting. Optional.
    excluded_location_ids: Geo target constant IDs the campaign
        excludes, to stop excluding. Optional.
    radius_criterion_ids: Criterion IDs of radius targets to remove:
        campaign_criterion.criterion_id from the read above, or the
        number after "~" in the resource name set_geo_targets returned.
        Optional.
    serve_everywhere: True when the user has agreed that the campaign
        may show in every location once its last targeted location or
        radius is removed. Default: False.

Returns:
    Dictionary with removed (kind, id and resource_name of each location
    target taken out), not_found (each one the campaign did not have),
    locations_removed and targeted_remaining (targeted locations and
    radius targets left; 0 means every location).

Tools revision: d80f65c0.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "customer_id": "<customer_id>",
      "campaign_id": "<campaign_id>"
    },
    "name": "remove_geo_targets"
  }
}

Input Schema

NameRequiredDescriptionDefault
campaign_idYes
customer_idYes
location_idsNo
serve_everywhereNo
radius_criterion_idsNo
excluded_location_idsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the destructiveHint and idempotentHint annotations, the description discloses exactly what is changed and what is not: only location and radius targets are touched, while languages, devices, ad schedule, keywords and other settings are never changed. It also explains partial failure reporting, no-op behavior when nothing is found, refusal before sending for Video campaigns, and the guard against removing the last targeted location without serve_everywhere.

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 operation and safety constraints, then moves into parameter details and the Returns contract. It is somewhat long and includes a detailed search query recipe, but that detail is relevant for obtaining radius criterion IDs and the structure remains easy to scan.

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-parameter Google Ads mutation tool, the definition covers prerequisites, refusal conditions, partial success semantics, the relationship to set_geo_targets, and the return shape. Even though an output schema exists, the description still explains the meaningful return fields, making the definition complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the full burden. It explains every parameter: customer_id format, campaign_id format, the distinction between location_ids, excluded_location_ids and radius_criterion_ids, where radius criterion IDs come from, and the meaning of serve_everywhere.

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 states a specific verb and resource: taking location targets out of a campaign. It explicitly positions the tool as the inverse of set_geo_targets and names the distinct target types it handles, so an agent can distinguish it from sibling tools.

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 explicit operational guidance: use set_geo_targets to add the new place before removing the old one, use search with campaign_criterion to read existing targets, and pass serve_everywhere only when the user agrees the campaign may serve everywhere. It also states the Video campaign refusal case and the not-found no-op behavior.

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