Skip to main content
Glama

Set campaign locations, excluded devices, and ad schedule

set_campaign_targeting
Destructive

Add location targeting, device exclusions, and/or an ad schedule (day-parting) to a Google Ads campaign. A campaign with no locations serves everywhere Google allows, so set locations before enabling a campaign meant for specific markets. Locations and schedule blocks are added alongside existing ones. Excluding a device sets that device's bid adjustment to -100%, which overwrites any adjustment already set for it. Undo any of these with remove_campaign_criterion.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
adScheduleNoDay-parting: one entry per day+hour-range block to serve in, e.g. Mon-Fri 9-18 is 5 entries. A campaign with no ad schedule at all serves every hour of every day.
campaignIdYes
customerIdNo10-digit Google Ads customer id. Omit only if this connection has exactly one reachable account - with more than one, omitting it errors and lists the available ids to pick from.
extraFieldsNoEscape hatch for a field Google requires that this tool doesn't set yet - use it when a prior call to this same tool failed naming a required field and its valid values (e.g. after adding `contains_eu_political_advertising`, retry with { contains_eu_political_advertising: "DOES_NOT_CONTAIN_EU_POLITICAL_ADVERTISING" }). Keys are the Ads API's own snake_case field names; nest an object to add a field under one this tool already sets (e.g. a new network_settings sub-field). Only ADDS fields not already set by this tool's own arguments - it can never override `status` or any other field already set here, so it cannot be used to bypass validation or a safety default like a campaign's PAUSED-by-default status.
geoTargetIdsNoGeo target constant ids to target, e.g. ['2840','2372'] for US and Ireland. Additive - existing location criteria are left alone.
validateOnlyNoDry run. When true the Google Ads API validates the change and reports any errors but applies nothing. Use this first whenever you are unsure - it is free and cannot affect spend.
excludeDevicesNoDevice types to stop serving on, e.g. ['MOBILE']. Sets the device's bid adjustment to -100%.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / excludeDevices / description
      Previous value: -"Device types to exclude from serving, e.g. ['MOBILE']. Implemented as a 0 bid modifier - Google Ads has no true device exclusion - which in practice stops that device from serving."New value: +"Device types to stop serving on, e.g. ['MOBILE']. Sets the device's bid adjustment to -100%."
  2. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already flag destructive and non-idempotent, but the description adds the concrete mechanics: locations and schedule blocks are additive ('added alongside existing ones'), and excluding a device silently sets that device's bid adjustment to -100%, overwriting any prior adjustment. That overwrite disclosure is exactly the kind of behavioral detail annotations cannot convey.

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?

Four tight sentences: purpose first, then the prerequisite for locations, then the additive/overwrite behavior, then the undo path. No filler, and the most decision-relevant information is front-loaded.

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 7-parameter mutation tool with nested adSchedule objects and no output schema, the description covers the branching behaviors an agent needs (additivity, device-exclusion overwrite, undo route), while the schema handles the 86% of parameter detail and validateOnly dry-run guidance.

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?

With 86% schema coverage the baseline is 3, but the description reinforces the additive semantics of location/schedule additions and the -100% overwrite consequence of excludeDevices, and explains the no-locations/no-schedule defaults. It does not add much on extraFields or validateOnly beyond the already-rich schema text.

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?

Opens with a specific verb and resource: 'Add location targeting, device exclusions, and/or an ad schedule (day-parting) to a Google Ads campaign.' This clearly distinguishes it from siblings like update_campaign and remove_campaign_criterion, which handle different operations on the same object.

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?

Gives an explicit when-to-use rule ('set locations before enabling a campaign meant for specific markets' since a campaign with no locations serves everywhere) and names the exact alternative for the inverse operation ('Undo any of these with remove_campaign_criterion'). Both direction and undo path are covered.

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