Skip to main content
Glama

Add locations to an X Ads ad group

x_ads_add_locations

Add location targeting to an existing X Ads ad group (targeting values from x_ads_search_locations). On an ad group with no locations this narrows it from worldwide and runs directly; on a running ad group that already targets locations it widens reach, so the first call returns a preview and it runs only with confirm=true after the user agrees.

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": {
      "campaign": "<campaign>",
      "ad_group": "<ad_group>",
      "locations": "<locations>"
    },
    "name": "x_ads_add_locations"
  }
}

Input Schema

NameRequiredDescriptionDefault
folderNoClient folder name.
accountNoX Ads account name or ID. Optional when only one is enabled.
confirmNo
ad_groupYesAd group (line item) name or ID.
campaignYesCampaign name or ID.
languageNoLanguage of the card: the language the user is writing in.
locationsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior3/5

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

Annotations declare readOnlyHint=false, destructiveHint=false, openWorldHint=true, so the write/safety profile is already given; the description's value-add is the state-dependent execution model (direct run vs. preview-then-confirm) and the fact that the first call is a no-op preview. Those are meaningful beyond the annotations. It stops short of saying whether the added locations merge with or replace existing ones, which is the one behavioral ambiguity that matters most for this tool.

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?

Two dense sentences, front-loaded with the operation, then the state-dependent behavior. No filler or restatement of the title.

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 7-parameter write tool with no output schema, the description covers the highest-risk aspects: the source of targeting values and the two-step confirm gate. It could note what the preview returns and whether locations are additive, but an agent has enough to call it 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 71%, and the schema leaves 'confirm' completely undescribed — the description supplies both its meaning and its precondition ('runs only with confirm=true after the user agrees'), which is real added meaning. It also implies locations accepts values from x_ads_search_locations. folder, account, and language are left to the schema.

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 ('Add location targeting to an existing X Ads ad group') and distinguishes itself from the lookup sibling x_ads_search_locations, which supplies the targeting values. An agent can tell this is a mutation on an existing ad group's geo-targeting without opening the schema.

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?

Explicitly routes the agent to x_ads_search_locations for the values, and lays out the two operating conditions: a locationless ad group narrows from worldwide and runs directly, while an already-targeted running ad group widens reach and requires confirm=true after user agreement. That is precisely the when/when-not guidance needed for a gated mutation.

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