Create autopilot rule
create_autopilot_ruleTurns a standing order the person describes into an autopilot rule, checked every hour. It is saved in DRY RUN: it records what it would do but changes nothing until the person switches it to live on the Autopilot screen. The result shows what it would match right now; tell them. level: campaign, adset or ad. window_days: 1 (today), 3, 7, 14 or 30, always including today. conditions (all must hold, 1 to 4): metric is one of spend, impressions, link_clicks, link_ctr (percent), cpc, cpm, frequency, landing_page_views, purchases, cpa, roas, results and cost_per_result (results by each campaign's own goal); op is gt, gte, lt, lte or eq; money values in the account currency's major units (200 means R200.00). A cost metric never matches something with no results, so 'spent R200 and no purchases' is spend gte 200 plus purchases eq 0. A rule judging a cost or a rate must also have a floor (spend, impressions or link clicks at least something), or it is refused. action: pause, alert (no change), lower_budget or raise_budget with percent 5 to 50 (budget rules only at campaign or adset level; raises only where the person allowed autopilot to raise in Settings). cooldown_hours (default 24) is how often it may act on the same thing. Ask the person for any number they did not give.
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>",
"level": "<level>",
"window_days": "<window_days>",
"conditions": "<conditions>",
"action": "<action>"
},
"name": "create_autopilot_rule"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| level | Yes | ||
| action | Yes | ||
| percent | No | For lower_budget and raise_budget. | |
| conditions | Yes | ||
| window_days | Yes | ||
| name_contains | No | Only things whose name contains this text. | |
| cooldown_hours | No |