Skip to main content
Glama

ads_tree

Read-onlyIdempotent

Campaigns with their ad sets and ads nested (data[].ad_sets[].ads[]), from the last background sync. The quickest way to see an account's whole structure. Takes the list filters (applied to campaigns) plus depth. Paginated by campaign: { total, page, per_page, data }.

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": "ads_tree"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoISO 8601. Created on the network at or before this time. No effect on Google Ads.
fromNoISO 8601. Created on the network at or after this time. No effect on Google Ads.
pageNoPage number, 1-based (default 1)
sortNoDefault newest
depthNoHow deep to nest. Default ad.
searchNoName contains this text, or exact network id
sourceNoall (default) or postproxy (created through Postproxy only)
statusNoOnly objects in one of these statuses
post_idNoOnly ads boosting this Postproxy post (post hashid)
per_pageNoPage size (default 25, max 100)
platformNoAd network: meta_ads or google_ads
profile_idNoOnly objects of this ads profile (hashid)
platform_idNoThe object with this network id
ad_account_idNoOnly objects of this ad account (network id from ads_accounts_list)
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.7/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, closed-world behavior, so the bar is lower, yet the description still adds real context: data comes from the last background sync (freshness), the response envelope is { total, page, per_page, data }, and pagination is per campaign. It does not say what happens when depth is shallower than requested, but the sync and pagination notes are genuinely useful.

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?

Four short sentences, front-loaded with the nesting shape, then positioning, then parameter behavior, then the pagination envelope. No filler, though the telegraphic phrasing ('plus depth', 'list filters') asks the reader to cross-reference the schema.

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 15-parameter, no-output-schema read tool, the description covers the essentials: it discloses the response shape, the pagination unit, filter scoping, and data freshness. The remaining gap is minor: it doesn't mention how unsorted/default behavior or empty nesting appears, but the schema plus read-only annotations carry the rest.

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 coverage is 100%, so the schema documents all 15 parameters, which sets the baseline at 3. The description adds one meaningful clarification not in the schema: the list filters (from, to, status, source, etc.) apply only to campaigns. It does not explain the depth parameter's effect beyond the schema's enum.

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 resource and shape: campaigns with nested ad_sets and ads (data[].ad_sets[].ads[]), and positions itself as the fastest way to view an account's whole structure. That implicitly distinguishes it from the flat list siblings (ads_campaigns_list, ads_ad_sets_list, ads_ads_list) by consolidation, though it never names them.

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?

The line 'The quickest way to see an account's whole structure' implies when to reach for it over flat list calls, but there is no explicit guidance on when to prefer it versus walking the hierarchy, nor any exclusions or prerequisites (e.g., needing an ad_account_id or profile_id to scope the call).

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.