update_meta_ad_rule
Change a Meta automated rule destructive
Description
Change a rule's name, what it looks at (send scope, conditions and window TOGETHER — Meta replaces the whole evaluation), its action and/or its schedule. Never changes whether it is on (set_meta_ad_rule_status does). IF THE RULE IS ON and the new version can raise spend, this takes confirm:true plus confirmScope for the NEW version and is checked against the account caps: an edit is never a way round the switch-on gate. The answer is Meta's stored rule, read back. Free.
Parameters
| Parameter | Type | Description |
|---|---|---|
adAccountIdrequired | string | Meta ad account id (act_… or the bare number) from list_meta_ads; required — every rule lives on one ad account |
ruleIdrequired | string | rule id from list_meta_ad_rules |
name | string | |
scope | object | what the rule looks at: level or ids (Meta requires one) |
scope.level | "campaign" | "adset" | "ad" | campaign, adset or ad: every object at that level, INCLUDING ones created later (Meta re-resolves it each run) |
scope.ids | string[] | a FIXED list of campaign, ad set or ad ids instead of a level |
scope.campaignIds | string[] | only objects under these campaigns |
scope.adsetIds | string[] | only ads under these ad sets |
scope.nameContains | string | only objects whose name contains this |
scope.statuses | string[] | effective_status values, e.g. ["ACTIVE"] |
conditions | object[] | when it acts (all must hold) |
conditions[].field | string | any Meta rule filter field, as Meta spells it: spent, cost_per, cpa, cpc, cpm, ctr, results, impressions, frequency, website_purchase_roas, mobile_app_purchase_roas, cost_per_purchase_fb, cost_per_lead_fb, today_spent, yesterday_spent, lifetime_spent, daily_budget, hours_since_creation … |
conditions[].operator | string | GREATER_THAN, LESS_THAN, EQUAL, NOT_EQUAL, IN_RANGE, NOT_IN_RANGE, IN, NOT_IN, CONTAIN, NOT_CONTAIN |
conditions[].value | string | number | string | number[] | a number, or [low, high] for IN_RANGE. MONEY IS IN THE CURRENCY BASE UNIT: for USD 1000 = $10.00 |
window | string | time window for the metrics: TODAY, YESTERDAY, LAST_3_DAYS, LAST_7_DAYS, LAST_14_DAYS, LAST_30_DAYS, LIFETIME, THIS_MONTH … |
attributionWindow | string | |
action | object | what it does |
action.type | "pause" | "enable" | "notify" | "budget" | "bid" | pause, enable (switch back on), notify, budget or bid |
action.change | "increase" | "decrease" | increase or decrease, for budget/bid. Meta has no "set to" |
action.by | object | exactly one of percent or amount |
action.by.percent | number | |
action.by.amount | number | in the currency base unit (cents for USD) |
action.limit | number | number[] | REQUIRED for an increase: the ceiling (base unit, 5000 = $50.00). A floor for a decrease. [low, high] with targetField |
action.targetField | string | scale the budget/bid toward a target metric instead (Meta's target_field), e.g. cost_per_result |
action.target | number | the target value for targetField |
action.minMinutesBetween | number | Meta's action_frequency: minutes before the same object is changed again; default 1440 (once a day) |
action.maxTimes | number | the most times this action may run in all (execution_count_limit) |
action.level | string | campaign for a campaign budget (CBO); otherwise the ad set budget |
action.userIds | string[] | Meta user ids to notify; default is the connection's user |
schedule | object | how often Meta checks it (schedule rules) |
schedule.type | "DAILY" | "HOURLY" | "SEMI_HOURLY" | "CUSTOM" | DAILY, HOURLY, SEMI_HOURLY or CUSTOM |
schedule.times | object[] | for CUSTOM |
schedule.times[].startMinute | number | minutes after midnight, account time, multiple of 30 |
schedule.times[].endMinute | number | |
schedule.times[].days | number[] | 0 = Sunday … 6 = Saturday |
trigger | object | makes it a TRIGGER rule Meta checks in real time (no schedule; pause/enable/notify only) |
trigger.type | string | METADATA_CREATION, METADATA_UPDATE, STATS_CHANGE, STATS_MILESTONE or DELIVERY_INSIGHTS_CHANGE |
trigger.field | string | |
trigger.value | string | number | boolean | string | number[] | |
trigger.operator | string | |
evaluationSpec | object | advanced: Meta's raw evaluation_spec, passed through as given (overrides the plain fields) |
executionSpec | object | advanced: Meta's raw execution_spec, passed through as given (overrides the plain fields) |
scheduleSpec | object | advanced: Meta's raw schedule_spec, passed through as given (overrides the plain fields) |
confirm | boolean | true once the user has said yes to exactly what the refusal described |
confirmScope | string | the scopeToken the list tool (or the refusal) prints; required with confirm when the rule can raise spend |
Example call
Every required parameter is shown, filled from the schema where it gives a value and otherwise with a placeholder naming the type. Replace the placeholders with real values. The same call works on the MCP server, the CLI and POST https://app.hermoso.ai/v1/tools/update_meta_ad_rule.
MCP (tools/call)
{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"update_meta_ad_rule","arguments":{"adAccountId":"<string>","ruleId":"<string>"}}}
CLI
hermoso call update_meta_ad_rule --json '{"adAccountId":"<string>","ruleId":"<string>"}'
Credits
Credits are spent only on two things: running an AI model (image, video, voice, text, planning, post-production) and Ad Spy research. See Credits & costs.
Related tools
set_meta_ad_rule_statusSwitch a Meta automated rule on or offlist_meta_ad_rulesList Meta automated rules, and which can raise spendcreate_meta_ad_ruleCreate a Meta automated rule (created switched OFF)delete_meta_ad_ruleDelete a Meta automated rulerun_meta_ad_ruleDry-run (or run now) a Meta automated rulemeta_ad_rule_historyWhat Meta's automated rules didset_meta_ad_rule_limitsCaps on what Meta rules may raisecreate_google_ads_ruleCreate a Google Ads automated rule (created switched OFF)list_google_ads_rulesList Google Ads automated rulesupdate_google_ads_ruleChange a Google Ads automated rule