Skip to main content
Glama
get-mcp-ads

Meta Ads by Get MCP Ads

meta get campaign structure

meta_get_campaign_structure
Read-onlyIdempotent

Retrieve the hierarchical campaign structure—campaigns, ad sets, and ads—for an ad account or specific campaign to understand account organization.

Instructions

Get hierarchical campaign structure: campaigns -> ad sets -> ads. Useful for understanding account organization.

Input Schema

NameRequiredDescriptionDefault
campaignIdNoGet structure for a specific campaign only
adAccountIdYesAd account ID (e.g., act_123456789)

Output Schema

NameRequiredDescriptionDefault
resultYesOriginal tool result: parsed JSON when the text is JSON, otherwise the text or multiple MCP content blocks. Provider fields depend on the selected query.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.1.1
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedOutput schema / properties / result / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": true,
      -    "properties": {},
      -    "type": "object"
      -  },
      -  {
      -    "items": {},
      -    "type": "array"
      -  },
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "boolean"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": {},
      +    "properties": {},
      +    "type": "object"
      +  },
      +  {
      +    "items": {},
      +    "type": "array"
      +  },
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "boolean"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  2. First observedv2.0.1

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive, and open-world, so the safety profile is covered. The description adds the hierarchy depth (three levels) as real context, but says nothing about pagination, result size, or whether lower levels are always nested.

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?

Two short sentences, front-loaded with the hierarchy shape. The second sentence is mildly redundant filler but still signals intent, so no trimming penalty beyond that.

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?

Given an output schema exists and annotations cover safety, the description is nearly complete for this 2-param read tool. The only omission is any hint about depth-limit or ordering behavior of the returned tree.

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% and both parameters are documented inline, including the campaignId scoping note. The description adds no syntax, format, or behavior information beyond what the schema already provides, so the baseline 3 applies.

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 ('Get hierarchical campaign structure') and specifies the exact shape returned: campaigns -> ad sets -> ads. This differentiates it implicitly from flat list siblings like meta_get_campaigns and meta_get_adsets, though those siblings are never named.

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?

Only a vague steer is given ('Useful for understanding account organization'); no explicit when-to-use, when-not-to-use, or named alternative such as meta_get_campaigns/meta_get_adsets for flat retrieval. An agent must infer the choice.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.