Set Alert Rule
sonar_set_alertWRITE tool — create or update an alert subscription in the caller's Sonar workspace. Upserts on (type + scope): re-submitting the same type/scope updates the existing rule. Omit threshold for the per-type default; omit scope_app_id for an org-wide rule. Requires an Indie plan (trial counts) and an API key with the write scope.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | The alert type to subscribe to. | |
| enabled | No | Whether the rule is active. Defaults to enabled when omitted. | |
| threshold | No | Sensitivity threshold (meaning depends on type). Omit or null to use the per-type default. | |
| scope_app_id | No | Limit the alert to a single app (Sonar app UUID). Omit or null for an org-wide rule covering all tracked apps. |