Skip to main content
Glama

List targeting options

ads_list_targeting
Read-only

Search or list targeting options for an ad account. Meta: interests or locations (search with q; locationTypes country, region, city, zip), behaviors, demographics or languages (q filters), for ads_create_meta_campaign targeting: a location's id is its key, a language's id its locale number, and demographics also need their type. TikTok: regions, languages or interests, for ads_create_tiktok_campaign. LinkedIn: locations (search with q), job_functions, seniorities, industries or company_sizes, for ads_create_linkedin_campaign; each id is the URN to target.

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": {
      "adAccountId": "<adAccountId>",
      "type": "<type>"
    },
    "name": "ads_list_targeting"
  }
}

Input Schema

NameRequiredDescriptionDefault
qNoMeta: search by name (required for interests and locations). LinkedIn: search locations or industries by name.
goalNo
typeYes
platformNometa_ads, tiktok_ads or linkedin_ads. Needed only when the profile has more than one ad network and no accountId is given.
accountIdNoThe Facebook accountId from list_accounts. Without it, pass profileId to use that profile's Facebook connection.
profileIdNoA profileId from list_profiles. Optional when accountId is given, which names its profile; if both are given they must agree.
adAccountIdYes
countryCodeNoMeta locations: limit to one country.
locationTypesNoMeta locations: comma-separated, e.g. city,zip.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / countryCode
      Added value: +{
      +  "description": "Meta locations: limit to one country.",
      +  "pattern": "^[A-Z]{2}$",
      +  "type": "string"
      +}
    • addedInput schema / properties / locationTypes
      Added value: +{
      +  "description": "Meta locations: comma-separated, e.g. city,zip.",
      +  "pattern": "^(country|region|city|zip)(,(country|region|city|zip))*$",
      +  "type": "string"
      +}
    • changedInput schema / properties / q / description
      Previous value: -"LinkedIn: search locations or industries by name."New value: +"Meta: search by name (required for interests and locations). LinkedIn: search locations or industries by name."
    • changedInput schema / properties / type / anyOf
      Previous value: -[
      -  {
      -    "enum": [
      -      "regions",
      -      "languages",
      -      "interests"
      -    ],
      -    "type": "string"
      -  },
      -  {
      -    "enum": [
      -      "locations",
      -      "job_functions",
      -      "seniorities",
      -      "industries",
      -      "company_sizes"
      -    ],
      -    "type": "string"
      -  }
      -]New value: +[
      +  {
      +    "enum": [
      +      "interests",
      +      "behaviors",
      +      "demographics",
      +      "locations",
      +      "languages"
      +    ],
      +    "type": "string"
      +  },
      +  {
      +    "enum": [
      +      "regions",
      +      "languages",
      +      "interests"
      +    ],
      +    "type": "string"
      +  },
      +  {
      +    "enum": [
      +      "locations",
      +      "job_functions",
      +      "seniorities",
      +      "industries",
      +      "company_sizes"
      +    ],
      +    "type": "string"
      +  }
      +]
  2. Changed6 schema fields changed
    • changedInput schema / properties / platform / description
      Previous value: -"meta_ads or tiktok_ads. Needed only when the profile has both ad networks and no accountId is given."New value: +"meta_ads, tiktok_ads or linkedin_ads. Needed only when the profile has more than one ad network and no accountId is given."
    • changedInput schema / properties / platform / enum
      Previous value: -[
      -  "meta_ads",
      -  "tiktok_ads"
      -]New value: +[
      +  "meta_ads",
      +  "tiktok_ads",
      +  "linkedin_ads"
      +]
    • addedInput schema / properties / q
      Added value: +{
      +  "description": "LinkedIn: search locations or industries by name.",
      +  "maxLength": 100,
      +  "type": "string"
      +}
    • addedInput schema / properties / type / anyOf
      Added value: +[
      +  {
      +    "enum": [
      +      "regions",
      +      "languages",
      +      "interests"
      +    ],
      +    "type": "string"
      +  },
      +  {
      +    "enum": [
      +      "locations",
      +      "job_functions",
      +      "seniorities",
      +      "industries",
      +      "company_sizes"
      +    ],
      +    "type": "string"
      +  }
      +]
    • removedInput schema / properties / type / enum
      Removed value: -[
      -  "regions",
      -  "languages",
      -  "interests"
      -]
    • removedInput schema / properties / type / type
      Removed value: -"string"
  3. Added

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so safety and external-lookup behavior are covered. The description adds that search is mandatory for certain Meta and LinkedIn types, which is useful behavior beyond the annotations. However, with no output schema it says nothing about result shape, result volume, or pagination for what are open-world catalog queries.

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?

Front-loaded with the core action, then organized platform-by-platform with semicolons, and every clause carries actionable content (types, search rules, id formats). It is dense and somewhat run-on, requiring careful parsing, but there is no filler.

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

Completeness3/5

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

For a 9-parameter, three-platform lookup tool with no output schema, the definition covers inputs and targeting-id conventions well but never describes what comes back (id/name pairs, ordering, limits). That gap matters because the returned ids are the whole point of the call.

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?

Adds real meaning beyond the 67%-covered schema: the id semantics for targeting (a Meta location's id is its key, a language's id is its locale number, demographics also need their type, LinkedIn ids are the URNs to target) are essential for chaining into campaign creation. It also maps the type enum union to platforms and explains locationTypes/q usage. It leaves goal and the accountId/profileId/platform resolution entirely 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 ('Search or list targeting options for an ad account') and then decomposes it per platform (Meta/TikTok/LinkedIn), naming the exact option categories each supports. It explicitly ties each platform branch to the corresponding ads_create_*_campaign sibling, so an agent can tell it apart from the creation tools without opening a schema.

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?

It gives concrete usage rules: q is required for Meta interests and locations, q filters Meta behaviors/demographics/languages, and LinkedIn locations search with q. It also frames the tool as the lookup step feeding ads_create_meta/tiktok/linkedin_campaign. It does not say what to do when a search returns nothing or when to prefer browsing over searching.

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