Alert rules
list_alertsRead a site's alert rules and recent firings to check overnight events, and optionally pre-fill a new alert draft for the user to confirm.
Instructions
Read the alerts on a site: the rules and what fired. Never creates or changes a rule.
rules: what each watches (soc %, import/export price c/kWh, forecast temperature °C), the threshold, whether it emails, when it last fired. events: the 20 most recent firings, newest first (rule, value, time, delivery). Answers "did anything happen overnight?".
To propose a NEW alert, pass it in the draft arguments (metric, operator and threshold at least). Nothing is saved: hosts with cards show the form filled in and the person's click on "Add alert" is their yes, so wait for them. Without a card, restate the rule and call create_alert once they agree.
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": "list_alerts"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Draft only: a title for the proposed alert. Omitted = one is made from the rule. | |
| No | Draft only: tick the form's email box (also mail the account's address on each firing). | ||
| metric | No | Draft only: what the proposed alert watches. soc (battery %), import_price / export_price (c/kWh), temperature (forecast °C). Leave every draft argument out to only read. | |
| site_id | Yes | Site id from list_sites: vendor:station_id, e.g. sungrow:1445844. | |
| operator | No | Draft only: fire when the value is above or below the threshold. | |
| threshold | No | Draft only: the value to compare with, in the metric's unit. | |
| cooldown_minutes | No | Draft only: quiet time after a firing, in minutes (15 or more). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||