Skip to main content
Glama

AdsAgent — Meta Ads MCP

insights_pull_product_breakdowns

Fetch country, placement, age, gender, OS, or hourly Meta metrics for selected products and dates. Uses stored coverage or queues a bounded pull and returns task_ref; poll tasks_get_status, then read each dimension with insights_read_breakdowns. New pulls consume the existing daily quota without changing ad delivery

Input Schema

NameRequiredDescriptionDefault
levelYes
ad_idsNo
date_toYes
date_fromYes
breakdownsNo
product_idsNo
product_refsNo
product_namesNo
conversion_eventNo

Output Schema

NameRequiredDescriptionDefault
messageNo
retryableNo
support_refNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • removedInput schema / properties / connection_context
      Removed value: -{
      -  "pattern": "^mctx_v1_[0-9a-f]{64}$",
      -  "type": "string"
      -}
  2. Changed12 schema fields changed
    • changedOutput schema / else / else / anyOf
      Previous value: -[
      -  {
      -    "properties": {
      -      "expires_at": {
      -        "type": "string"
      -      },
      -      "poll": {
      -        "properties": {
      -          "arguments": {
      -            "properties": {
      -              "product_ref": {
      -                "type": "string"
      -              },
      -              "task_ref": {
      -                "type": "string"
      -              },
      -              "template_name": {
      -                "type": "string"
      -              }
      -            },
      -            "type": "object"
      -          },
      -          "name": {
      -            "type": "string"
      -          },
      -          "tool": {
      -            "type": "string"
      -          }
      -        },
      -        "type": "object"
      -      },
      -      "poll_after_ms": {
      -        "type": "integer"
      -      },
      -      "status": {
      -        "const": "queued"
      -      },
      -      "submitted_new": {
      -        "type": "boolean"
      -      },
      -      "task_ref": {
      -        "type": "string"
      -      },
      -      "task_status": {
      -        "type": "string"
      -      },
      -      "task_type": {
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "status",
      -      "task_ref",
      -      "task_status",
      -      "poll_after_ms",
      -      "expires_at",
      -      "poll"
      -    ]
      -  },
      -  {
      -    "properties": {
      -      "available_slices": {
      -        "items": {
      -          "properties": {
      -            "breakdown_type": {
      -              "type": "string"
      -            },
      -            "date_from": {
      -              "type": [
      -                "string",
      -                "null"
      -              ]
      -            },
      -            "date_to": {
      -              "type": [
      -                "string",
      -                "null"
      -              ]
      -            },
      -            "level": {
      -              "type": "string"
      -            }
      -          },
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "recommended_next_tool": {
      -        "type": "string"
      -      },
      -      "routing": {
      -        "properties": {
      -          "cache_coverage": {
      -            "properties": {
      -              "products": {
      -                "additionalProperties": {
      -                  "properties": {
      -                    "complete": {
      -                      "type": "boolean"
      -                    },
      -                    "has_more": {
      -                      "type": "boolean"
      -                    },
      -                    "limitations": {
      -                      "items": {
      -                        "type": "string"
      -                      },
      -                      "type": "array"
      -                    },
      -                    "next_cursor": {
      -                      "type": [
      -                        "string",
      -                        "null"
      -                      ]
      -                    },
      -                    "returned_count": {
      -                      "type": "integer"
      -                    },
      -                    "source": {
      -                      "type": "string"
      -                    },
      -                    "source_observed_at": {
      -                      "type": [
      -                        "string",
      -                        "null"
      -                      ]
      -                    },
      -                    "source_watermark": {
      -                      "type": [
      -                        "string",
      -                        "null"
      -                      ]
      -                    },
      -                    "total_count": {
      -                      "type": [
      -                        "integer",
      -                        "null"
      -                      ]
      -                    }
      -                  },
      -                  "type": "object"
      -                },
      -                "type": "object"
      -              },
      -              "status": {
      -                "type": "string"
      -              }
      -            },
      -            "type": "object"
      -          },
      -          "decision": {
      -            "type": "string"
      -          },
      -          "pull_breakdowns": {
      -            "items": {
      -              "type": "string"
      -            },
      -            "type": "array"
      -          },
      -          "quota": {
      -            "properties": {
      -              "available": {
      -                "type": "boolean"
      -              },
      -              "limit": {
      -                "type": [
      -                  "integer",
      -                  "null"
      -                ]
      -              },
      -              "operator_bypass": {
      -                "type": "boolean"
      -              },
      -              "remaining": {
      -                "type": "integer"
      -              },
      -              "used": {
      -                "type": "integer"
      -              }
      -            },
      -            "type": "object"
      -          },
      -          "reason": {
      -            "type": "string"
      -          },
      -          "recommended_next_tool": {
      -            "type": "string"
      -          }
      -        },
      -        "type": "object"
      -      },
      -      "submitted_new": {
      -        "const": false
      -      }
      -    },
      -    "required": [
      -      "routing",
      -      "submitted_new",
      -      "message",
      -      "available_slices"
      -    ]
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "status": {
      +        "const": "queued"
      +      }
      +    },
      +    "required": [
      +      "expires_at",
      +      "poll",
      +      "poll_after_ms",
      +      "status",
      +      "task_ref",
      +      "task_status"
      +    ]
      +  },
      +  {
      +    "properties": {
      +      "submitted_new": {
      +        "const": false
      +      }
      +    },
      +    "required": [
      +      "available_slices",
      +      "message",
      +      "routing",
      +      "submitted_new"
      +    ]
      +  }
      +]
    • addedOutput schema / else / else / properties / available_slices
      Added value: +{
      +  "items": {
      +    "properties": {
      +      "breakdown_type": {
      +        "type": "string"
      +      },
      +      "date_from": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "date_to": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "level": {
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / else / else / properties / expires_at
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / else / else / properties / poll
      Added value: +{
      +  "properties": {
      +    "arguments": {
      +      "properties": {
      +        "product_ref": {
      +          "type": "string"
      +        },
      +        "task_ref": {
      +          "type": "string"
      +        },
      +        "template_name": {
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "name": {
      +      "type": "string"
      +    },
      +    "tool": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
    • addedOutput schema / else / else / properties / poll_after_ms
      Added value: +{
      +  "type": "integer"
      +}
    • addedOutput schema / else / else / properties / recommended_next_tool
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / else / else / properties / routing
      Added value: +{
      +  "properties": {
      +    "cache_coverage": {
      +      "properties": {
      +        "products": {
      +          "additionalProperties": {
      +            "properties": {
      +              "complete": {
      +                "type": "boolean"
      +              },
      +              "has_more": {
      +                "type": "boolean"
      +              },
      +              "limitations": {
      +                "items": {
      +                  "type": "string"
      +                },
      +                "type": "array"
      +              },
      +              "next_cursor": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "returned_count": {
      +                "type": "integer"
      +              },
      +              "source": {
      +                "type": "string"
      +              },
      +              "source_observed_at": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "source_watermark": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "total_count": {
      +                "type": [
      +                  "integer",
      +                  "null"
      +                ]
      +              }
      +            },
      +            "type": "object"
      +          },
      +          "type": "object"
      +        },
      +        "status": {
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "decision": {
      +      "type": "string"
      +    },
      +    "pull_breakdowns": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "quota": {
      +      "properties": {
      +        "available": {
      +          "type": "boolean"
      +        },
      +        "limit": {
      +          "type": [
      +            "integer",
      +            "null"
      +          ]
      +        },
      +        "operator_bypass": {
      +          "type": "boolean"
      +        },
      +        "remaining": {
      +          "type": "integer"
      +        },
      +        "used": {
      +          "type": "integer"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "reason": {
      +      "type": "string"
      +    },
      +    "recommended_next_tool": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
    • addedOutput schema / else / else / properties / status
      Added value: +{
      +  "const": "queued"
      +}
    • addedOutput schema / else / else / properties / submitted_new
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / else / else / properties / task_ref
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / else / else / properties / task_status
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / else / else / properties / task_type
      Added value: +{
      +  "type": "string"
      +}
  3. Changed6 schema fields changed
    • addedOutput schema / else / then / properties / category
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / else / then / properties / expected
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / else / then / properties / failure_kind
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / else / then / properties / responsibility_hint
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / else / then / properties / route
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / else / then / properties / user_visible
      Added value: +{
      +  "type": "boolean"
      +}
  4. Changed1 schema field changed
    • addedInput schema / properties / connection_context
      Added value: +{
      +  "pattern": "^mctx_v1_[0-9a-f]{64}$",
      +  "type": "string"
      +}
  5. Changed1 schema field changed
    • addedInput schema / properties / conversion_event
      Added value: +{
      +  "type": "string"
      +}
  6. Changed1 schema field changed
    • addedInput schema / properties / ad_ids
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "maxItems": 50,
      +  "minItems": 1,
      +  "type": "array"
      +}
  7. First observed

TDQS

A4.6/5.0
Behavior5/5

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

The description offers critical behavioral details beyond the annotations. Specifically, it informs the agent that the pull 'consumes the existing daily quota' (a major side effect) and that it operates 'without changing ad delivery' (a critical safety constraint). It also details the queuing nature of the operation.

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?

The description is highly efficient. It logically progresses from defining the metrics (what) to defining the complex workflow (how), and finally, to stating the operational constraints (rules). There is no wasted language.

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 the tool's inherent complexity (multi-step asynchronous workflow and rate limiting), the description is highly complete regarding the execution logic and external constraints. The only gap is the lack of parameter semantic definition, which holds the score back from a perfect 5.

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 0%, requiring the description to carry the full load. While the description correctly lists and defines the available `breakdowns` (country, age, etc.), it provides no semantic guidance whatsoever for the other 8 parameters (e.g., date format, scope of `level`, or relationship between product IDs/names). It offers marginal value compensation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: fetching specific Meta metrics (country, placement, age, gender, OS, or hourly) for selected products and dates. It provides sufficient detail that an agent can distinguish this action from simple reading tools by highlighting the necessary metrics and the initiation of a bounded pull.

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

Usage Guidelines5/5

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

The description provides explicit procedural guidelines for usage, outlining the entire required workflow: the tool queues a pull, returns a `task_ref`, and the agent must then poll `tasks_get_status` before using `insights_read_breakdowns`. This sequence dictates precise usage.

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