How can my coding agent delete an alert rule or channel in Rius?
Your coding agent deletes a custom alert rule with the delete_alert_rule tool and a notification channel with delete_alert_channel, both on the Rius MCP server. Each deletion takes two calls: the first previews what would be destroyed and returns a confirmation phrase, and the second passes that phrase back to go ahead. You ask in plain words, such as “Delete the cost spike alert”, and your client picks the tool and arguments.
How it works
Both tools are part of the Rius MCP server, which your client reaches at the server key rius. See the MCP overview for connecting and the tool reference for every argument.
delete_alert_rule removes a custom rule and its entire firing history. It cannot be undone. Its main parameters:
ref: the custom rule’s uuid, which the agent reads fromlist_alert_rules. Predefined rules cannot be deleted at all.confirm: empty on the first call. On the second call, the phrase from the first call’s output.workspace: optional. Pass a name or ID, or omit it for your default workspace. Useorg/workspacewhen the same name exists in two of your organizations.
delete_alert_channel removes a notification channel and is also irreversible. Its main parameters are channel_id (from list_alert_channels), confirm and workspace, used the same way. Any rule still pointing at the channel loses that destination silently. If it has no other channel, its firings still show in the console but nobody is notified.
What comes back. All tools return Markdown. The first call returns a preview of what would be destroyed and the phrase to pass back. The second call, with the phrase, carries out the deletion. If your connection is not allowed to delete, the tool replies with a message explaining why and changes nothing.
Who can delete. Over an OAuth sign-in, the alert-management tools work only for admins. With an API key, the key needs alerts:manage for rules or channels:manage for channels. An admin mints these two scopes in the Connect an agent dialog on the console’s MCP page. A key without them still lists the tools, but each one replies that the key isn’t allowed.
Set it up
-
Connect your client to the Rius MCP server if you have not yet. If you use the Rius plugin, it already registers the server as
rius. Otherwise, for Claude Code:claude mcp add --transport http rius https://mcp.eu.console.rius-glassflow.com/mcpOther clients and headless keys are covered on the MCP page. For a headless agent, mint the key with Manage alert rules, Manage notification channels, or both ticked.
-
Ask your agent to find the item. Say “What alerts are configured?” for rules (the agent calls
list_alert_rules) or “Where do my alerts go?” for channels (the agent callslist_alert_channels). This gives it thereforchannel_idit needs. -
Ask for the deletion in plain words. For a rule: “Delete the cost spike alert.” For a channel: “Remove the old ops webhook.” The agent sends the first call, which only previews:
{ "name": "delete_alert_rule", "arguments": { "ref": "9c2…" } }{ "name": "delete_alert_channel", "arguments": { "channel_id": "8a1…" } } -
Read the preview. If it matches what you want gone, tell the agent to go ahead. It repeats the call with the phrase from the preview in
confirm:{ "name": "delete_alert_rule", "arguments": { "ref": "9c2…", "confirm": "PHRASE_FROM_FIRST_CALL" } }Here
PHRASE_FROM_FIRST_CALLstands for the exact phrase the first call returned. Your client may also ask you to approve the call, because the delete tools carry a hint that marks them as destructive. -
Check the result by asking “What alerts are configured?” again.
What you get
- A guarded deletion: nothing is removed until the second call, so you see what is destroyed first.
- Rule cleanup from your editor or terminal. The rule and its firing history are gone once confirmed.
- Channel cleanup with a clear warning about rules that lose a destination.
- A plain refusal message, not a silent failure, when the connection lacks the admin role or the key lacks
alerts:manageorchannels:manage.
For how this fits into watching your agents in production, see Monitor AI agents in production.
When something else fits
- If you only want a rule to stop firing, ask the agent to use
update_alert_rulewithenabledset to false. That stops detection, keeps the history and can be undone. Note that gaps in history while a rule is off are permanent. - To pause a channel, use
update_alert_channelwithenabledset to false, which is reversible. - Predefined rules cannot be deleted. You can turn them off or change their settings with
update_alert_rule.