Skip to main content
Glama

Alert rules

list_alerts
Read-onlyIdempotent

Read 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

NameRequiredDescriptionDefault
nameNoDraft only: a title for the proposed alert. Omitted = one is made from the rule.
emailNoDraft only: tick the form's email box (also mail the account's address on each firing).
metricNoDraft 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_idYesSite id from list_sites: vendor:station_id, e.g. sungrow:1445844.
operatorNoDraft only: fire when the value is above or below the threshold.
thresholdNoDraft only: the value to compare with, in the metric's unit.
cooldown_minutesNoDraft only: quiet time after a firing, in minutes (15 or more).

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv0.11.5
    • addedInput schema / properties / cooldown_minutes / description
      Added value: +"Draft only: quiet time after a firing, in minutes (15 or more)."
    • addedInput schema / properties / email / description
      Added value: +"Draft only: tick the form's email box (also mail the account's address on each firing)."
    • changedInput schema / properties / metric / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "enum": [
      +      "soc",
      +      "import_price",
      +      "export_price",
      +      "temperature"
      +    ],
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / metric / description
      Added value: +"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."
    • addedInput schema / properties / name / description
      Added value: +"Draft only: a title for the proposed alert. Omitted = one is made from the rule."
    • changedInput schema / properties / operator / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "enum": [
      +      "above",
      +      "below"
      +    ],
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / operator / description
      Added value: +"Draft only: fire when the value is above or below the threshold."
    • addedInput schema / properties / site_id / description
      Added value: +"Site id from list_sites: vendor:station_id, e.g. sungrow:1445844."
    • addedInput schema / properties / threshold / description
      Added value: +"Draft only: the value to compare with, in the metric's unit."
  2. Changed6 schema fields changedv0.11.4
    • addedInput schema / properties / cooldown_minutes
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Cooldown Minutes"
      +}
    • addedInput schema / properties / email
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Email"
      +}
    • addedInput schema / properties / metric
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Metric"
      +}
    • addedInput schema / properties / name
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Name"
      +}
    • addedInput schema / properties / operator
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Operator"
      +}
    • addedInput schema / properties / threshold
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Threshold"
      +}
  3. First observedv0.9.0

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so the safety profile is covered; the description adds genuinely new behavior: draft arguments save nothing, a host card renders a filled form and the person's click on 'Add alert' is the consent step. It also discloses the events payload shape (20 most recent, newest first) that annotations cannot convey. It stops short of anything about auth or failure modes, so not a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the read purpose, then field-level detail, then the draft/consent flow; the backticked field names aid scanning. It is dense and slightly long in the draft paragraph, but no sentence is filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, the description need not spell out return values, yet it usefully summarizes both result sections. What remains slightly unclear is what the response looks like when draft arguments are supplied on a host without a card, so a small gap persists for a 7-parameter tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds a constraint the schema does not encode: a draft needs 'metric, operator and threshold at least', which resolves the fact that all draft params are individually optional. It also names the units (soc %, c/kWh, °C) in prose, reinforcing the enums.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Read the alerts on a site: the rules and what fired') and immediately bounds it with 'Never creates or changes a rule', which cleanly separates it from create_alert and delete_alert. The two named sections (`rules`, `events`) tell an agent exactly what content comes back.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit when-to-use guidance for both modes: omit draft arguments to only read, pass them to propose a new alert. It also names the alternative path ('call create_alert once they agree') and states the condition that selects it, plus the human-confirmation requirement, leaving little to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.