gam_ad_unit_tree
Resolve Google Ad Manager ad-unit names to IDs with full hierarchy paths, status, and parent filters for forecasts, targeting, and inventory structure lookups.
Instructions
MODE: read-only, cached 1h. UI: Inventory → Ad units. The ad-unit hierarchy: id, name, code, parent, full path, status, specialAdUnit (= GAM's 'explicitly targeted' mark — only serves when targeted directly), hasChildren. Filter by name/code search, parent (direct children), or status. OUTPUT: flat rows with resolved paths — ids feed forecast/targeting inputs. WHEN TO USE: resolving ad-unit names→ids for forecasts, structure questions, finding a publisher's units. Set refresh=true after known GAM inventory changes.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "gam_ad_unit_tree"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Default 100. | |
| offset | No | ||
| search | No | Case-insensitive substring on name, code, or path. | |
| status | No | ||
| refresh | No | Bypass the 1h cache. | |
| network_code | No | ||
| parent_ad_unit_id | No | Only direct children of this ad unit. | |
| include_special_only | No | Only 'special' (explicitly targeted) ad units. |