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 authorized Sonar account or an API key with the write scope.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | The alert type to subscribe to. top_chart = one of your own apps entered or left a store top chart (overall + its category, free/paid/grossing). | |
| enabled | No | Whether the rule is active. Defaults to enabled when omitted. | |
| countries | No | top_chart only: storefronts to watch (ISO 3166-1 alpha-2, e.g. ["us", "de"]), max 10. Omit to keep the stored list; null or [] = the countries you track keywords in. | |
| threshold | No | Sensitivity threshold (meaning depends on type; for top_chart it's the rank cutoff, 1-200, default 200). 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. |