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.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "<name>",
      "meta_account_id": "<meta_account_id>",
      "metric": "<metric>",
      "operator": "<operator>",
      "threshold": "<threshold>"
    },
    "name": "create_automation_rule"
  }
}

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

A4/5.0
Behavior4/5

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

The description adds critical behavioral context beyond the structural data, such as the default action being 'alert-only.' This informs the agent of a safe, out-of-the-box state, helping it construct a more complete and intended request.

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 effective, using one dense but clear sentence where every clause adds functional value. It is front-loaded with the main concept and flows logically from trigger to result.

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 such a parameter-heavy tool, the description provides an excellent high-level summary of the interaction between metrics, thresholds, and lookback windows. This complexity is well-managed in the description, though specific value ranges for the numerical parameters are left to the schema.

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?

Given the 100% schema coverage, the description's role is high-level summary. It correctly identifies the main components—metric, threshold, lookback window, and entity—making the function of the complex parameters clear without repeating schema syntax.

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 clearly states the purpose (creating an automation rule) and defines the core logic: triggering when a metric crosses a threshold over a lookback window. It specifies that this is done for an ad account, providing necessary operational context without unnecessary detail.

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?

It provides clear context on when and where to use the tool by noting it works at campaign, ad set, or ad levels. It also explicitly warns that new rules default to 'alert-only' unless overridden, guiding the user's initial choice.

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