Skip to main content
Glama

ADS MCP

Set Demand Gen Locations

set_demand_gen_locations

Sets geographic targeting for a DEMAND GEN campaign. Demand Gen does not accept location criteria at the campaign level (use set_campaign_locations for Search/PMax instead) — Google's API requires Demand Gen location targeting at the AD GROUP level, so this writes AdGroupCriterion.location against ad_group_id (from create_demand_gen_ad_group), not campaign_id. Common geo criterion IDs: US=2840, UK=2826, CA=2124, AU=2036, FI=2246, DE=2276.

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": {
      "user_intent": "<user_intent>",
      "ad_group_id": "<ad_group_id>"
    },
    "name": "set_demand_gen_locations"
  }
}

Input Schema

NameRequiredDescriptionDefault
ad_group_idYesThe Demand Gen ad group to target (from create_demand_gen_ad_group's ad_group_id, NOT the campaign_id).
customer_idNo
user_intentYes
target_location_idsNoGeo criterion IDs to TARGET, e.g. ['2246'] for Finland.
negative_location_idsNoOptional. Geo criterion IDs to EXCLUDE.
exclude_preset_locationsNoSet 'true' to automatically add negative locations for India(2356), Nepal(2524), Pakistan(2586), Bangladesh(2050), Afghanistan(2004), Sri Lanka(2144).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false and destructiveHint=false; the description adds real value by naming the underlying write target (AdGroupCriterion.location) and explaining the API constraint that forces ad-group-level targeting. It does not say whether the call replaces or appends existing location criteria, which matters for a mutation tool — that omission keeps it from a 5.

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?

A single front-loaded block that leads with the action, then the constraint, then the ID reference table. The geo ID list is dense but functional; nothing is redundant with the schema except the repeated ad_group_id warning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 6-parameter mutation tool with no output schema, the definition covers purpose, placement level, prerequisite, and criterion IDs. The remaining gap is return/overwrite behavior — whether existing geo criteria are cleared — which an agent would need to call this safely.

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 67%, and the description compensates by supplying a bank of geo criterion IDs (US=2840, UK=2826, CA=2124, AU=2036, FI=2246, DE=2276) that goes well beyond the schema's single '2246 for Finland' example. It also reinforces that ad_group_id comes from create_demand_gen_ad_group rather than campaign_id. customer_id and user_intent still get no explanation in either place.

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?

States a specific verb and resource ('Sets geographic targeting for a DEMAND GEN campaign') and immediately scopes it to the ad group level. It explicitly distinguishes itself from set_campaign_locations, so an agent can route correctly without opening sibling schemas.

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 explicit when-to-use ('Demand Gen... requires location targeting at the AD GROUP level') and when-to-use-the-alternative ('use set_campaign_locations for Search/PMax instead'). It also names create_demand_gen_ad_group as the source of ad_group_id, closing the prerequisite gap.

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.