Add alert
create_alertSet up a threshold alert for a solar or battery site so the app notifies the inbox and phone, and optionally emails, when the watched metric crosses a value.
Instructions
Set up a threshold alert on a site: it fires when the watched metric crosses the threshold. Every firing goes to the app inbox (and the phone when the app is installed); email=True also mails the account's verified address (list_sites account.email_alerts says whether that works). An alert only tells the person something; it never changes what the battery does. Confirm the rule with the user before creating it (or let them add it from the list_alerts card). Returns the site's rules with the new one under created.
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": {
"site_id": "<site_id>",
"name": "<name>",
"metric": "<metric>",
"operator": "<operator>",
"threshold": "<threshold>"
},
"name": "create_alert"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Title shown on the alert, up to 100 characters. An empty string = one is made from the rule ("SOC below 20%"). | |
| No | Also mail the account's verified address on each firing. | ||
| locale | No | Language of the alert text and email. | en |
| metric | Yes | What to watch: soc (battery %), import_price / export_price (c/kWh, the current Amber interval), temperature (forecast °C). | |
| message | No | The person's own words, put in front of the alert text; up to 400 characters. | |
| site_id | Yes | Site id from list_sites: vendor:station_id, e.g. sungrow:1445844. | |
| operator | Yes | Fire when the value is above or below the threshold. | |
| threshold | Yes | The value to compare with, in the metric's unit (%, c/kWh, °C). | |
| active_end | No | HH:MM site local: end of that daily window. | 00:00 |
| active_start | No | HH:MM site local: start of the daily window in which the alert may fire. Same as active_end = all day. | 00:00 |
| cooldown_minutes | No | Quiet time after a firing, in minutes: 15 to 10080. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||