Skip to main content
Glama

Adbloop Meta Ads

create_automation_rule

Destructive

Create an automation rule for an ad account: when a metric crosses a threshold over a lookback window, take an action (alert, pause, or scale budget). New rules default to alert-only unless you set a different action. Works at campaign, ad set, or ad level.

Input Schema

NameRequiredDescriptionDefault
nameYesA short name for the rule.
actionNoWhat to do when it triggers. Defaults to alert.
metricYesMetric to evaluate.
operatorYesgt=greater than, lt=less than, etc.
frequencyNoHow often to check. Default daily.
thresholdYesThe number the metric is compared to.
entity_typeNoWhat the rule watches. Default campaign.
action_valueNoFor scale_budget: percent step (e.g. 20 = +20%). For set_budget: absolute daily budget in major units.
lookback_daysNoWindow the metric is measured over, 1-90. Default 3.
cooldown_hoursNoMin hours between actions on the same campaign. Default 24.
meta_account_idYesREQUIRED — the ad account the rule watches.
result_action_typeNoFor cpa/results rules that pause or scale: the Meta result to count (e.g. lead, offsite_conversion.fb_pixel_purchase). Required to let a cpa/results rule take a money action.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / entity_type
      Added value: +{
      +  "description": "What the rule watches. Default campaign.",
      +  "enum": [
      +    "campaign",
      +    "adset",
      +    "ad"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / metric / enum
      Previous value: -[
      -  "spend",
      -  "cpa",
      -  "results",
      -  "roas",
      -  "ctr",
      -  "cpc",
      -  "cpm",
      -  "impressions",
      -  "clicks"
      -]New value: +[
      +  "spend",
      +  "cpa",
      +  "results",
      +  "roas",
      +  "ctr",
      +  "cpc",
      +  "cpm",
      +  "impressions",
      +  "clicks",
      +  "cpl",
      +  "cpp",
      +  "leads",
      +  "purchases"
      +]
  2. Added

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and readOnlyHint=false, so the description only needs to add context. It does: the safe default (alert-only) is disclosed up front, and the pause/scale-budget actions make clear the rule can mutate live delivery. It stops short of warning that pausing halts spend or that budget scaling changes real money at a fixed cadence.

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?

Three short sentences, front-loaded with the core verb and resource, then the trigger model, then the defaults. Nothing is wasted and the most decision-relevant fact (alert-only default) appears early.

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 12-parameter mutation tool with no output schema, the description conveys the rule model and the action default clearly. It leaves open what the call returns (e.g. a created rule id) and does not mention that cpa/results rules need result_action_type before taking a money action, though the schema does cover the latter.

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 100% and enum values are fully documented, so the schema carries the parameter burden. The description reinforces the lookback window and entity level conceptually but adds no syntax, ranges, or format detail beyond what the schema already says.

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?

The description uses a specific verb and resource ('Create an automation rule for an ad account') and then explains the rule's conceptual model (metric + threshold + lookback + action), which makes the create-versus-run/delete/list distinction obvious. It never names a sibling explicitly, so it falls just short of a 5.

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?

'New rules default to alert-only unless you set a different action' gives useful selection context for the action argument, and 'Works at campaign, ad set, or ad level' scopes the tool. But there is no guidance on when to create a rule versus using run_automation_rules or set_automation_rule_active, and no stated prerequisites.

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