Skip to main content
Glama

Adbloop Meta Ads

create_automation_rule

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

TableJSON 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

A4/5.0
Behavior3/5

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

Annotations declare readOnlyHint=false, consistent with 'create'. The description adds useful behavioral context: new rules default to alert-only, and it can target campaign, ad set, or ad level. It does not mention permissions, rate limits, or response behavior, but with annotations covering the read-only distinction, the added default and scope details merit a 3.

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 two sentences with zero fluff. The main purpose is front-loaded, and the default behavior and scope are stated efficiently. Every sentence earns its place.

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 has 12 parameters, the description provides the high-level flow, defaults, and supported levels. It does not explicitly mention the interplay of action_value and result_action_type for money actions, but the schema covers that. The description is sufficient for an agent to understand the tool's function and invoke it correctly, with minor gaps that the schema fills.

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 already documents all 12 parameters. The description adds semantic linking between metric, threshold, lookback window, and the action types (alert, pause, scale budget), which helps an agent understand the rule logic. It does not explain less obvious parameters like action_value or result_action_type, but those are covered in the schema, so the description meets the baseline for high coverage.

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 verb 'Create' and the resource 'automation rule', then explains the core logic (metric crosses threshold over lookback window, triggers an action). It distinguishes itself from sibling tools like list_automation_rules, delete_automation_rule, and run_automation_rules by focusing on creation and noting the default alert-only behavior.

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

Usage Guidelines4/5

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

The description implies this is for creating rules, while siblings handle listing, deletion, running, and toggling. However, it does not explicitly say 'use this instead of X when...' or mention any exclusions. The context is clear enough for an agent to infer when to use it, but it lacks explicit alternative routing.

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