Skip to main content
Glama

meta_ads_ad_rules_create

Create automated Meta Ads rules that evaluate on a schedule and fire actions—pause underperformers, adjust budgets, or send alerts—when performance triggers match.

Instructions

Creates a new Automated Rule that Meta evaluates on the configured schedule and fires actions when the trigger matches. Returns the new rule_id. Mutating — not automatically reversible; record before-state with mureo_state_action_log_append if you may need to roll back. Common patterns: CPA-spike alert (execution NOTIFICATION), auto-pause ads with low ROAS (execution PAUSE), scale winners (execution CHANGE_BUDGET). evaluation_spec and execution_spec are Meta's JSON schemas — see Meta Ads Automated Rules API docs for the field set.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesRule name shown in Ads Manager. Should name the trigger and action (e.g. 'Pause ads CPA > target × 2').
reasonNoWhy this change is being made: one or two sentences naming the evidence and the expected effect. Stored in the journal and on the action_log entry this call produces, for the operator and the next session.
statusNoInitial status. Default ENABLED. Create with DISABLED and enable later to stage the rule without side effects.
account_idNoMeta Ads account ID in the format 'act_XXXXXXXXXX' (e.g. 'act_1234567890'). Optional — falls back to META_ADS_ACCOUNT_ID from the configured credentials. The leading 'act_' prefix is required.
schedule_specNoWhen the rule runs. Shape: {schedule_type: SEMI_HOURLY | DAILY | CUSTOM, schedule: [time specs]}. Default SEMI_HOURLY evaluates every 30 minutes.
execution_specYesAction definition. Shape: {execution_type: NOTIFICATION | PAUSE_CAMPAIGNS | UNPAUSE_CAMPAIGNS | CHANGE_BUDGET | CHANGE_BID, execution_options: [...]}. Budget/bid changes use delta or absolute value per execution_options.
evaluation_specYesTrigger definition. Shape: {evaluation_type: SCHEDULE | TRIGGER, filters: [{field, operator, value}, ...]}. Filters combine with AND; for OR create multiple rules.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.20.0
    • addedInput schema / properties / reason
      Added value: +{
      +  "description": "Why this change is being made: one or two sentences naming the evidence and the expected effect. Stored in the journal and on the action_log entry this call produces, for the operator and the next session.",
      +  "maxLength": 500,
      +  "type": "string"
      +}
  2. Changed1 schema field changedv0.10.37
    • addedInput schema / additionalProperties
      Added value: +false
  3. Addedv0.9.12
  4. Removedv0.9.6
  5. Addedv0.9.2
  6. Removedv0.9.1
  7. Addedv1.0.5

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and meets it: it flags the call as mutating, explicitly says it is not automatically reversible, instructs recording before-state for rollback, states that Meta will evaluate on a schedule and fire actions, and reports the returned rule_id. It also implies side-effect severity through the PAUSE/CHANGE_BUDGET examples.

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 dense but not bloated: purpose and return value first, mutation warning second, concrete patterns third, and documentation pointer last. Every sentence contributes distinct operational information, appropriately sized for a complex mutating tool.

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 complex creation tool with no output schema and no annotations, the description covers the critical items: return value, side effects, rollback path, and example patterns. It falls slightly short of full self-containedness because the detailed field set for evaluation_spec and execution_spec is deferred to external Meta docs rather than inlined, so an agent without doc access may need to rely on the schema's partial shapes.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema coverage is 100%, so the baseline is 3; the description adds value by linking execution types to real intents (CPA alert, pause low ROAS, scale winners) and directing the agent to the Meta API docs for the complex nested evaluation_spec and execution_spec. It slightly over-simplifies the PAUSE execution type, but still helps the agent choose parameter semantics.

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 states a specific verb and resource ('Creates a new Automated Rule') and adds what separates it from the sibling ad-rule tools: it creates rather than updates, deletes, lists, or gets, and names the return value (rule_id). The common-pattern examples make the purpose concrete.

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 gives clear usage context with three representative patterns and explicitly routes rollback bookkeeping to mureo_state_action_log_append. It does not directly contrast creation with meta_ads_ad_rules_update/delete, but the 'new' scope and sibling names make the intended use reasonably clear.

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

Deploy Server

Other Tools