Skip to main content
Glama

ads_targeting_search

Read-onlyIdempotent

Look up targeting options on the ad network and get the ids to use in targeting: interests, behaviors, languages, and location keys (the key of a region or city on Meta, a numeric location id on Google). Returns { data: [{ id, name, type, path, audience_size_lower, audience_size_upper, country_code, region, region_id }], next_page_token, cached }. Meta supports every type; Google only location and language.

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

Input Schema

NameRequiredDescriptionDefault
qNoSearch text. Optional for behavior, income, industry (lists all) and for location with location_type=region.
typeYesWhat to search. For interest_suggestion, q is an interest name to get related ones.
limitNoDefault 25, max 100
region_idNoRegion id, to narrow a location search
profile_idNoAds profile hashid (the profile_id of an ad account in ads_accounts_list). Optional when exactly one ads profile is connected; required when several are.
country_codeNoISO country code, to narrow a location search
location_typeNoNarrow a location search. Google supports country, region, city, zip, metro.
profile_group_idNoProfile group hashid, to scope the call to one profile group. Usually not needed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive behavior, so the description's added value is in what it returns and how: the full response shape, a next_page_token (pagination), a cached flag, and audience-size bounds. That is meaningful context beyond the annotation set. It does not discuss rate limits or how caching is invalidated, leaving a small gap.

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?

Purpose is front-loaded in the first clause, followed by the return shape and then platform constraints; three sentences with essentially no filler. The return-shape clause is dense but each element (pagination token, cached flag) carries information an agent needs.

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 an 8-parameter search tool with no output schema, the description compensates by documenting the returned fields and pagination, and by noting platform-specific type support. It leaves the profile_id/profile_group_id scoping behavior to the schema, which is acceptable given full schema coverage, but it is not exhaustive on multi-profile ambiguity.

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 100%, so the baseline is 3, but the description adds real meaning on top: it explains what a location "key" is per platform (a region/city key on Meta versus a numeric location id on Google) and which types each network supports. It does not elaborate on limit/default or how q interacts with type beyond what the schema already documents.

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?

The description opens with a specific verb and resource ("look up targeting options on the ad network") and enumerates the resource types covered (interests, behaviors, languages, locations), so an agent immediately knows what the tool resolves. It does not name a sibling such as ads_targeting_browse or explain how "search" differs from a "browse" call, which keeps it short of a 5.

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

Usage Guidelines3/5

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

It gives platform-scoped guidance ("Meta supports every type; Google only location and language"), which is genuine when-to-use information for type selection. However, it says nothing about when to pick this tool over ads_targeting_browse or ads_campaign_targeting_get, and no explicit exclusion or prerequisite is spelled out beyond the schema's profile_id note.

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.