Skip to main content
Glama
X Ads by Get MCP Ads

X Ads by Get MCP Ads

x ads search targeting locations

x_ads_search_targeting_locations
Read-onlyIdempotent

Search targetable X Ads locations by name to find the targeting_value IDs required for LOCATION-type targeting criteria. Filter by country, location type, and paginate results.

Instructions

Search targetable locations by name. Use this to find the targeting_value IDs required by add_targeting_criterion for LOCATION-type criteria. Native X fields and pagination are preserved; monetary fields ending in _micro are millionths of the account currency.

Input Schema

NameRequiredDescriptionDefault
qNoFree-text location name to search for, e.g. "united states" or "london". Omit to list locations u...
countNoNumber of records to return per page (1-1000).
cursorNoPagination cursor from a previous response.
country_codeNoTwo-letter ISO country code to scope results to, e.g. US.
location_typeNoScope results to one location granularity.

Output Schema

NameRequiredDescriptionDefault
resultYesOriginal tool result: parsed JSON when the text is JSON, otherwise the text or multiple MCP content blocks. Provider fields depend on the selected query.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.1.1
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedOutput schema / properties / result / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": true,
      -    "properties": {},
      -    "type": "object"
      -  },
      -  {
      -    "items": {},
      -    "type": "array"
      -  },
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "boolean"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": {},
      +    "properties": {},
      +    "type": "object"
      +  },
      +  {
      +    "items": {},
      +    "type": "array"
      +  },
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "boolean"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  2. First observedv1.0.1

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already establish readOnly, idempotent, non-destructive, open-world semantics, so the bar is lower. The description still adds useful behavior: responses preserve native X fields and pagination, which tells the agent to expect upstream-shaped objects and cursor paging.

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?

Three short sentences, front-loaded with the purpose and then the workflow link. The trailing note on _micro monetary fields is generic boilerplate for a location lookup and is the one sentence that does not fully earn its place.

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?

With an output schema present and full parameter documentation, the description needs only to orient the agent, which it does: purpose, workflow hook, and paging note. A note on omitted-q behavior (list all locations) would complete it.

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

Parameters3/5

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

Schema description coverage is 100% and the enum for location_type is fully documented, so the schema does the heavy lifting. The description mentions pagination existing but adds no semantics for q, country_code, or location_type beyond what is already structured.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Search targetable locations by name') and clearly implies a location catalog rather than the interest catalog used by sibling x_ads_search_targeting_interests. It does not explicitly name that sibling, but the resource distinction is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a concrete downstream use: find targeting_value IDs required by add_targeting_criterion for LOCATION-type criteria. That is a real when-to-use condition. It does not state when-not to use it or name the closest alternative (search_targeting_interests).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.