Skip to main content
Account rules propose a pause or daily-budget change when a target meets your counted-arrival and cost conditions. Create a rule through MCP or the REST API. The current Settings → Agent rules page no longer includes the former Account rules editor. New rules start disabled; enabling is a separate decision. In Ask, every proposed change waits for approval. In Full, admitted pauses and budget decreases can run automatically, but rule-generated budget increases always require human approval. Creating or editing a rule never changes Meta during that request.

Before you create a rule

  • Connect the intended Meta ad account and check its retained inventory and metrics.
  • Install Signals and verify counted arrivals. Rule comparisons use counted arrivals, not purchases, unique visitors or Meta-attributed conversions.
  • Review the workspace’s Agent rules and execution safety. API and MCP operations retain their own scope and grant checks.
  • For MCP, use the production server and an authorized Workspace key. Read keys can list and inspect rules; creating, editing or enabling requires Write and an active grant for that operation. Older account-bound keys keep their restriction. Never put a key in a prompt or source control.
The rule tools require workspace authorization. Their names and inputs appear in the published MCP server card.

What can a rule change?

Budget rules apply to daily budgets and remain subject to current provider state and policy. Rules do not resume targets, change lifetime budgets or create ads. Both conditions must hold over the last three complete days in the account timezone, with UTC as the fallback:
  1. The target reaches your minimum_counted_arrivals.
  2. Its cost per counted arrival is at_least or at_most your cost_ratio times the whole account’s cost per counted arrival.
The account also needs at least 50 counted arrivals. The ratio must be 0.10–10.00 with at most two decimal places. For example, at_least with 1.5 matches a target costing at least 1.5 times the account average. This comparison includes the target in the account baseline; it differs from the Resume outcome’s rest-of-account comparison. It does not establish causal harm or a performance forecast.

Create and enable a rule in the dashboard

The former dashboard Account rules editor has been removed from Agent rules. Use the supported MCP or REST operations below to create a disabled rule and explicitly enable it. Editing preserves immutable revisions; disabling a rule does not cancel proposals already created. Review those separately in Inbox.

Configure the same rule through MCP

Use these tools with their own grant permissions: For actions.rules.create, replace internal Plainrouter account ID 91 with your account’s ID. This field is platform_ad_account_id, rather than account_id or an external Meta act_… ID. Example arguments for a disabled pause rule:
Creation returns rule. Save its id and confirm enabled: false, account, window and current_revision. Do not send enabled on creation. To enable it, call actions.rules.update with the returned rule ID; the ID below is an illustrative placeholder:
Use enabled: false to disable. A name or definition edit appends an immutable revision; when editing definition, supply all its required fields. Enabling or disabling alone does not add a revision. The three-day window is fixed, so omit window and window_days.

Read or manage rules through REST

The API reference lists the same rule operations. Use a Workspace key with the matching operation grant, not a Signals Server secret. Paths below are relative to https://plainrouter.com/api/v1. For a first read, set PLAINROUTER_WORKSPACE_ID to the key’s workspace ID and load PLAINROUTER_WORKSPACE_KEY from secure server configuration:
Expect 200 and inspect rules, including continuation fields, before treating the list as complete. Keep the same filters when following rules.next_cursor as the cursor query parameter. An account-bound key retains its account restriction. For these REST routes, an unbound key requires exactly one eligible active account; multiple active accounts return 422 even if account_id is supplied. Check the published contract before assuming MCP account-selection behavior applies. Creation accepts name and the complete definition shown above; omit enabled. Verify the 201 response has rule.enabled: false. Enabling requires a separate PATCH with {"enabled": true}. Editing cannot change the account, and neither request performs a Meta change. A 403 calls for checking the key’s workspace, tier and operation grant; 422 requires correcting the input or resolving account ambiguity. A suspended rule has no current self-serve resume control on Agent rules; inspect the suspension before changing its definition.

How do I verify evaluation and execution?

Evaluation is scheduled hourly. It reads retained metrics and arrivals, records a window and revision, then proposes eligible matches through normal Actions admission. Saving a rule is not an evaluation or proof of a Meta change. Call actions.rules.show with rule_id. Inspect enabled, suspended_at, suspended_reason, current_revision and runs. Each run records its window, timezone, status, reason, account totals and per-target decisions. The read returns recent runs and bounded decision pages; do not assume the first response contains the complete history.

How do I continue rule history?

Read responses can contain fewer rows to fit the response-size budget. Continue history with the read tool; do not repeat actions.rules.create or actions.rules.update just to retrieve another page. A decision marked proposed includes action_batch_id. Follow that batch in Inbox or the Actions API; confirm approval where required, the execution receipt and exact provider verification. A matching rule or proposed batch is not Landed.

How do I resume a suspended rule?

A rule is suspended when its two most recent judged actions are both lost. Inspect those actions’ outcome comparisons and inverse proposals, together with the rule definition and recorded runs. The current Agent rules page no longer shows the former Resume rule control. There is no MCP resume tool, and editing the definition or toggling enabled does not clear suspension. Keep the recorded reason visible rather than claiming the rule resumed. Historical runs, revisions and outcomes remain evidence of what happened.

Why did a rule not produce another change?

An eligible lost rule-made daily-budget change can create a separate inverse proposal to the recorded prior budget. A rule-made pause is not judged for performance and cannot trigger that response. An inverse proposal does not create another inverse chain. Follow what happens after a lost outcome.