Skip to main content
Glama

Get campaign tree

ads_get_tree
Read-only

Return an ad account's campaigns, ad sets and ads, with spend and delivery metrics for the date range.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sinceNoYYYY-MM-DD. Give both since and until, or neither for the default range.
untilNoYYYY-MM-DD, on or after since, at most 730 days later.
accountIdNoThe Facebook accountId from list_accounts. Defaults to the profile's Facebook connection.
profileIdNoDefaults to the profile your API key is bound to.
adAccountIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/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 scope are covered. The description adds the useful behavioral fact that results are date-range scoped and carry spend/delivery metrics, but says nothing about result size, pagination, or rate limits, which matters for a tree that fans out to every ad.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with the resource first and the payload second. Every clause carries information and there is no filler.

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 no output schema, the description does the necessary work of naming what is returned (campaigns, ad sets, ads plus spend and delivery metrics), which is enough for an agent to call it correctly. It stops short of describing pagination or output shape for a potentially large tree, a minor gap given the read-only annotations.

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 80%, so the schema already documents since/until pairing rules, the 730-day cap, and the accountId default. The description only echoes the date-range concept and implies the account scope; it adds no syntax or defaulting detail beyond the schema. Baseline 3 is appropriate.

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 ('Return an ad account's campaigns, ad sets and ads') and specifies the payload (spend and delivery metrics for the date range). This is clearly distinguishable from flat sibling reads like ads_get_account, though it does not name any sibling explicitly to sharpen the boundary with ads_get_insights.

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 description implies the use case (fetching the full hierarchy with metrics for a period) but gives no explicit when-to-use guidance and never names an alternative such as ads_get_insights for metrics-only queries. An agent must infer the routing from the tool name and sibling list.

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