# Hermoso: update_meta_ad_rule · Hermoso developer docs

> Machine-readable twin of https://hermoso.ai/docs/reference/ads/update_meta_ad_rule/. Generated from the shipped page. Do not edit by hand.
> Full agent guide: https://hermoso.ai/llms.txt · MCP: https://app.hermoso.ai/mcp

[Docs](https://hermoso.ai/docs/) / [Tool reference](https://hermoso.ai/docs/reference/) / [Ad campaign management](https://hermoso.ai/docs/reference/ads/) / update_meta_ad_rule

# `update_meta_ad_rule`

Change a Meta automated rule destructive

Area: AUTOMATED AD RULES · [Ad campaign management](https://hermoso.ai/docs/reference/ads/). Generated from the running MCP server, like the rest of the [tool reference](https://hermoso.ai/docs/reference/).

## 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

`adAccountId` required `string` Meta ad account id (act_… or the bare number) from list_meta_ads; required — every rule lives on one ad account

`ruleId` required `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](https://hermoso.ai/docs/credits/).

## Related tools

- [set_meta_ad_rule_status](https://hermoso.ai/docs/reference/ads/set_meta_ad_rule_status/) Switch a Meta automated rule on or off
- [list_meta_ad_rules](https://hermoso.ai/docs/reference/ads/list_meta_ad_rules/) List Meta automated rules, and which can raise spend
- [create_meta_ad_rule](https://hermoso.ai/docs/reference/ads/create_meta_ad_rule/) Create a Meta automated rule (created switched OFF)
- [delete_meta_ad_rule](https://hermoso.ai/docs/reference/ads/delete_meta_ad_rule/) Delete a Meta automated rule
- [run_meta_ad_rule](https://hermoso.ai/docs/reference/ads/run_meta_ad_rule/) Dry-run (or run now) a Meta automated rule
- [meta_ad_rule_history](https://hermoso.ai/docs/reference/ads/meta_ad_rule_history/) What Meta's automated rules did
- [set_meta_ad_rule_limits](https://hermoso.ai/docs/reference/ads/set_meta_ad_rule_limits/) Caps on what Meta rules may raise
- [create_google_ads_rule](https://hermoso.ai/docs/reference/ads/create_google_ads_rule/) Create a Google Ads automated rule (created switched OFF)
- [list_google_ads_rules](https://hermoso.ai/docs/reference/ads/list_google_ads_rules/) List Google Ads automated rules
- [update_google_ads_rule](https://hermoso.ai/docs/reference/ads/update_google_ads_rule/) Change a Google Ads automated rule

[All 759 Ad campaign management tools](https://hermoso.ai/docs/reference/ads/) · [tools.json](https://hermoso.ai/docs/reference/tools.json)
