Skip to main content
Glama

Create an alert rule

create_alert_rule

Create an alert rule notifying an integration each time an event happens in the project, or in every project with the organization scope. The app of the integration must support the event.

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": {
      "project_id": "<project_id>",
      "scope": "<scope>",
      "event": "<event>",
      "integration_id": "<integration_id>",
      "rate_limit": "<rate_limit>"
    },
    "name": "create_alert_rule"
  }
}

Input Schema

NameRequiredDescriptionDefault
eventYesName of the event that will trigger the execution of the alert rule
scopeYesScope of the alert rule, `organization` to execute it for the events of every project or `project` to only execute it for the events of the current project
project_idYesID of the project to act on, see whoami
rate_limitYesMinimum time in minutes between two executions of the alert rule, used to minimize the number of alerts received.
event_settingsNoAdditional settings for the event
integration_idYesThe ID of the integration used to send a notification when the alert rule is executed
integration_settingsNoAdditional settings for the integration

Output Schema

NameRequiredDescriptionDefault
idNo
eventNoName of the event that will trigger the execution of the alert rule
created_atNoDate of creation for the entity
project_idNoThe ID of a project to use as a scope
rate_limitNoMinimum time in minutes between two executions of the alert rule, used to minimize the number of alerts received.
updated_atNoDate of last update for the entity
event_settingsNoAdditional settings for the event
integration_idNoThe ID of the integration used to send a notification when the alert rule is executed
integration_settingsNoAdditional settings for the integration

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / integration_settings / anyOf
      Previous value: -[
      -  {
      -    "title": "Empty",
      -    "type": [
      -      "object",
      -      "null"
      -    ]
      -  },
      -  {
      -    "properties": {
      -      "priority": {
      -        "description": "Notification priority level",
      -        "enum": [
      -          "min",
      -          "low",
      -          "default",
      -          "high",
      -          "max"
      -        ],
      -        "examples": [
      -          "default"
      -        ],
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "priority"
      -    ],
      -    "title": "Ntfy",
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "schema": {
      -        "description": "JSON schema defining the webhook payload structure",
      -        "examples": [
      -          "{\"id\": \"{{ alert_rule_request.id }}\", \"event\": \"{{ event.key }}\"}"
      -        ],
      -        "format": "json",
      -        "maxLength": 5000,
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "schema"
      -    ],
      -    "title": "Outgoing Webhooks",
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "expire": {
      -        "description": "Expiration time in seconds (required for emergency priority)",
      -        "examples": [
      -          3600
      -        ],
      -        "maximum": 10800,
      -        "minimum": 30,
      -        "type": [
      -          "integer",
      -          "null"
      -        ]
      -      },
      -      "priority": {
      -        "description": "Notification priority level",
      -        "enum": [
      -          "lowest",
      -          "low",
      -          "normal",
      -          "high",
      -          "emergency"
      -        ],
      -        "examples": [
      -          "normal"
      -        ],
      -        "type": "string"
      -      },
      -      "retry": {
      -        "description": "Retry interval in seconds (required for emergency priority)",
      -        "examples": [
      -          300
      -        ],
      -        "maximum": 86400,
      -        "minimum": 30,
      -        "type": [
      -          "integer",
      -          "null"
      -        ]
      -      }
      -    },
      -    "required": [
      -      "priority"
      -    ],
      -    "title": "Pushover",
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "title": "Empty",
      +    "type": [
      +      "object",
      +      "null"
      +    ]
      +  },
      +  {
      +    "properties": {
      +      "priority": {
      +        "description": "Notification priority level",
      +        "enum": [
      +          "min",
      +          "low",
      +          "default",
      +          "high",
      +          "max"
      +        ],
      +        "examples": [
      +          "default"
      +        ],
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "priority"
      +    ],
      +    "title": "Ntfy",
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "schema": {
      +        "description": "JSON schema defining the webhook payload structure",
      +        "examples": [
      +          "{\"id\": \"{{ alert_rule_request.id }}\", \"event\": \"{{ event.key }}\"}"
      +        ],
      +        "format": "json",
      +        "maxLength": 5000,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "schema"
      +    ],
      +    "title": "Outgoing Webhooks",
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "expire": {
      +        "description": "Seconds after which an unacknowledged `emergency` priority notification stops repeating. Required by the `emergency` priority, unused by the others.",
      +        "examples": [
      +          3600
      +        ],
      +        "maximum": 10800,
      +        "minimum": 30,
      +        "type": [
      +          "integer",
      +          "null"
      +        ]
      +      },
      +      "priority": {
      +        "description": "Notification priority level",
      +        "enum": [
      +          "lowest",
      +          "low",
      +          "normal",
      +          "high",
      +          "emergency"
      +        ],
      +        "examples": [
      +          "normal"
      +        ],
      +        "type": "string"
      +      },
      +      "retry": {
      +        "description": "Seconds between the repeats of an `emergency` priority notification until it is acknowledged. Required by the `emergency` priority, unused by the others.",
      +        "examples": [
      +          300
      +        ],
      +        "maximum": 86400,
      +        "minimum": 30,
      +        "type": [
      +          "integer",
      +          "null"
      +        ]
      +      }
      +    },
      +    "required": [
      +      "priority"
      +    ],
      +    "title": "Pushover",
      +    "type": "object"
      +  }
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "created_at": {
      +      "description": "Date of creation for the entity",
      +      "format": "date-time",
      +      "type": "string"
      +    },
      +    "event": {
      +      "description": "Name of the event that will trigger the execution of the alert rule",
      +      "enum": [
      +        "uptime.monitor.created",
      +        "uptime.monitor.deleted",
      +        "uptime.monitor_certificate.discovered",
      +        "uptime.monitor_certificate.expiring",
      +        "uptime.incident.created",
      +        "uptime.incident.propagated",
      +        "uptime.incident.partially_recovered",
      +        "uptime.incident.recovered",
      +        "uptime.incident_comment.created",
      +        "uptime.incident_update.published",
      +        "uptime.maintenance_window.in_progress",
      +        "uptime.maintenance_window.completed",
      +        "uptime.maintenance_window.cancelled"
      +      ],
      +      "type": "string"
      +    },
      +    "event_settings": {
      +      "anyOf": [
      +        {
      +          "title": "Empty",
      +          "type": [
      +            "object",
      +            "null"
      +          ]
      +        },
      +        {
      +          "properties": {
      +            "type": {
      +              "description": "Type of incident to notify about",
      +              "enum": [
      +                "all",
      +                "monitor",
      +                "manual"
      +              ],
      +              "examples": [
      +                "all"
      +              ],
      +              "type": "string"
      +            }
      +          },
      +          "title": "Uptime incident",
      +          "type": "object"
      +        },
      +        {
      +          "properties": {
      +            "days_before_expiry": {
      +              "description": "Days to notify before the certificate expires",
      +              "examples": [
      +                25
      +              ],
      +              "type": "integer"
      +            }
      +          },
      +          "title": "Uptime certificate expiring",
      +          "type": "object"
      +        }
      +      ],
      +      "description": "Additional settings for the event"
      +    },
      +    "id": {
      +      "examples": [
      +        1
      +      ],
      +      "type": "integer"
      +    },
      +    "integration_id": {
      +      "description": "The ID of the integration used to send a notification when the alert rule is executed",
      +      "examples": [
      +        1
      +      ],
      +      "type": "integer"
      +    },
      +    "integration_settings": {
      +      "anyOf": [
      +        {
      +          "title": "Empty",
      +          "type": [
      +            "object",
      +            "null"
      +          ]
      +        },
      +        {
      +          "properties": {
      +            "priority": {
      +              "description": "Notification priority level",
      +              "enum": [
      +                "min",
      +                "low",
      +                "default",
      +                "high",
      +                "max"
      +              ],
      +              "examples": [
      +                "default"
      +              ],
      +              "type": "string"
      +            }
      +          },
      +          "title": "Ntfy",
      +          "type": "object"
      +        },
      +        {
      +          "properties": {
      +            "schema": {
      +              "description": "JSON schema defining the webhook payload structure",
      +              "examples": [
      +                "{\"id\": \"{{ alert_rule_request.id }}\", \"event\": \"{{ event.key }}\"}"
      +              ],
      +              "format": "json",
      +              "type": "string"
      +            }
      +          },
      +          "title": "Outgoing Webhooks",
      +          "type": "object"
      +        },
      +        {
      +          "properties": {
      +            "expire": {
      +              "description": "Seconds after which an unacknowledged `emergency` priority notification stops repeating. Required by the `emergency` priority, unused by the others.",
      +              "examples": [
      +                3600
      +              ],
      +              "type": [
      +                "integer",
      +                "null"
      +              ]
      +            },
      +            "priority": {
      +              "description": "Notification priority level",
      +              "enum": [
      +                "lowest",
      +                "low",
      +                "normal",
      +                "high",
      +                "emergency"
      +              ],
      +              "examples": [
      +                "normal"
      +              ],
      +              "type": "string"
      +            },
      +            "retry": {
      +              "description": "Seconds between the repeats of an `emergency` priority notification until it is acknowledged. Required by the `emergency` priority, unused by the others.",
      +              "examples": [
      +                300
      +              ],
      +              "type": [
      +                "integer",
      +                "null"
      +              ]
      +            }
      +          },
      +          "title": "Pushover",
      +          "type": "object"
      +        }
      +      ],
      +      "description": "Additional settings for the integration"
      +    },
      +    "project_id": {
      +      "description": "The ID of a project to use as a scope",
      +      "examples": [
      +        1
      +      ],
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "rate_limit": {
      +      "description": "Minimum time in minutes between two executions of the alert rule, used to minimize the number of alerts received.",
      +      "enum": [
      +        0,
      +        5,
      +        10,
      +        30,
      +        60,
      +        180,
      +        720,
      +        1440
      +      ],
      +      "examples": [
      +        5
      +      ],
      +      "type": "integer"
      +    },
      +    "updated_at": {
      +      "description": "Date of last update for the entity",
      +      "format": "date-time",
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare the write profile (readOnlyHint=false, idempotentHint=false, openWorldHint=true, destructiveHint=false), so the bar is lower. The description still adds meaningful substance: the rule has an external side effect (notifying an integration), and creation fails unless the integration's app supports the chosen event — a precondition not visible in annotations or schema.

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

Conciseness5/5

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

Two sentences, zero filler, with the core action front-loaded and the scope/precondition detail following. Every clause carries information an agent could not get from the schema alone.

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?

An output schema exists, so return values need no explanation, and the scope plus integration-compatibility precondition cover the main conceptual gaps for a 7-parameter create tool. It could go further by noting whether duplicate rules for the same event/integration are allowed, which affects correct invocation.

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

Parameters3/5

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

Schema description coverage is 100% and the enum descriptions for `scope`, `event`, and `rate_limit` are already thorough. The description restates the two scope values but adds no format, constraint, or interaction details (e.g., whether event_settings is required for particular events) beyond the schema; baseline 3 applies.

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 ("Create an alert rule") and immediately defines the resulting behavior: notifying an integration on an event, scoped either to the current project or to every project under `organization`. This is clearly distinguishable from siblings like create_integration or list_alert_rules.

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

Usage Guidelines4/5

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

The description gives real context for choosing the `organization` scope versus the project scope, and states a hard prerequisite ("The app of the integration must support the event"). It stops short of naming alternatives such as update_alert_rule for modifying an existing rule or list_alert_rules for checking duplicates, so no explicit when-not guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources