Skip to main content
Glama

Set alert route

set_route
DestructiveIdempotent

Route a monitor's alerts for one event type to selected destinations, replacing the event's current routing set; pass an empty channel list to clear all notifications.

Instructions

Requires the write scope or higher. Routes a monitor's alerts for one event type to a set of destinations (channels). Replaces the whole destination set for that event type: destinations not listed stop receiving it, including ones someone else configured. get_monitor's routes field holds the current set, so adding a destination means sending the existing ids plus the new one. An empty channel_ids removes all routing for the event. Destinations have to be verified and enabled (an email one confirmed). list_destinations returns the ids.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
event_typeYesdown (incident opened), recovery (incident cleared), fail (failure ping), every-run (each completed run), success, started (GitHub's requested and in_progress each send one, so one CI run can notify twice), blocked (an agent awaits a human: held 10 minutes, cancelled by a ping or step of the same run in that time; sent once per blocked stretch; not the 'blocked' incident of blocked_timeout_s), note (an annotation). down, recovery and fail fire only on a state change. every-run, success, started and note share a separate per-channel rate cap (60/hour default) and are not flap-damped, so one chatty route can suppress the group; blocked draws on the protected down/fail/recovery budget.
monitor_idYesMonitor (check) UUID.
channel_idsNoComma-separated destination (channel) UUIDs to notify. An empty string clears the route.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.17
    • changedInput schema / properties / channel_ids / description
      Previous value: -"Comma-separated destination (channel) UUIDs to notify. Empty string clears the route."New value: +"Comma-separated destination (channel) UUIDs to notify. An empty string clears the route."
    • changedInput schema / properties / event_type / description
      Previous value: -"One of eight: down (alert opened), recovery (alert cleared), fail (explicit failure ping), every-run (one notification per completed run, success or failure), success (fires only when a run completes successfully), started (fires when a run begins), blocked (an agent reported it is waiting on a human; held 10 minutes and sent only if that run is still blocked then, at most once per blocked stretch of a run: a note, step, success, fail or cancel for the same run inside the 10 minutes cancels it, a title does not; a blocked ping sent without a run id belongs to no run, so any non-blocked ping on the monitor ends its stretch: a start, log, note, success, fail or cancel of any run, or a step of the monitor's current run (any step when no run is current); this is separate from the 'blocked' INCIDENT that opens later only if the wait outlives blocked_timeout_s, see create_monitor/update_monitor), note (a free-form annotation ping — never itself opens or clears an incident). Prefer down/recovery/fail: they fire only on a state change. every-run, success, started, and note are not state changes and are bounded only by how often the monitor runs (or how often the agent chooses to send them), so they can be very chatty, and none of them is flap-damped. started is the chattiest of the bunch for CI-fed monitors: GitHub maps both the workflow_run 'requested' and 'in_progress' webhook events to a start signal, so a single CI run can emit more than one started event — this was observed in production, where a real run logged two starts seconds apart. every-run, success, started, and note share one separate per-channel rate cap (60/hour by default), so together they can no longer use up the budget that down/fail/recovery/blocked need — but a chatty route on any one of the four can silently suppress its own notifications, and its sibling informational types' notifications, once it exceeds that shared cap. blocked is deliberately NOT in that shared group even though it is agent-reported rather than system-derived: a blocked agent needs a human, so it draws on the protected down/fail/recovery budget instead, precisely so it cannot be starved by chatty every-run/success/started/note traffic. Route informational types to a low-stakes destination, not to the one that pages someone."New value: +"down (incident opened), recovery (incident cleared), fail (failure ping), every-run (each completed run), success, started (GitHub's requested and in_progress each send one, so one CI run can notify twice), blocked (an agent awaits a human: held 10 minutes, cancelled by a ping or step of the same run in that time; sent once per blocked stretch; not the 'blocked' incident of blocked_timeout_s), note (an annotation). down, recovery and fail fire only on a state change. every-run, success, started and note share a separate per-channel rate cap (60/hour default) and are not flap-damped, so one chatty route can suppress the group; blocked draws on the protected down/fail/recovery budget."
  2. Changed1 schema field changedv0.1.9
    • changedInput schema / properties / event_type / description
      Previous value: -"One of eight: down (alert opened), recovery (alert cleared), fail (explicit failure ping), every-run (one notification per completed run, success or failure), success (fires only when a run completes successfully), started (fires when a run begins), blocked (an agent reported it is waiting on a human — fires immediately, the moment the ping arrives; this is separate from the 'blocked' INCIDENT that opens later only if the wait outlives blocked_timeout_s, see create_monitor/update_monitor), note (a free-form annotation ping — never itself opens or clears an incident). Prefer down/recovery/fail: they fire only on a state change. every-run, success, started, and note are not state changes and are bounded only by how often the monitor runs (or how often the agent chooses to send them), so they can be very chatty, and none of them is flap-damped. started is the chattiest of the bunch for CI-fed monitors: GitHub maps both the workflow_run 'requested' and 'in_progress' webhook events to a start signal, so a single CI run can emit more than one started event — this was observed in production, where a real run logged two starts seconds apart. every-run, success, started, and note share one separate per-channel rate cap (60/hour by default), so together they can no longer use up the budget that down/fail/recovery/blocked need — but a chatty route on any one of the four can silently suppress its own notifications, and its sibling informational types' notifications, once it exceeds that shared cap. blocked is deliberately NOT in that shared group even though it is agent-reported rather than system-derived: a blocked agent needs a human, so it draws on the protected down/fail/recovery budget instead, precisely so it cannot be starved by chatty every-run/success/started/note traffic. Route informational types to a low-stakes destination, not to the one that pages someone."New value: +"One of eight: down (alert opened), recovery (alert cleared), fail (explicit failure ping), every-run (one notification per completed run, success or failure), success (fires only when a run completes successfully), started (fires when a run begins), blocked (an agent reported it is waiting on a human; held 10 minutes and sent only if that run is still blocked then, at most once per blocked stretch of a run: a note, step, success, fail or cancel for the same run inside the 10 minutes cancels it, a title does not; a blocked ping sent without a run id belongs to no run, so any non-blocked ping on the monitor ends its stretch: a start, log, note, success, fail or cancel of any run, or a step of the monitor's current run (any step when no run is current); this is separate from the 'blocked' INCIDENT that opens later only if the wait outlives blocked_timeout_s, see create_monitor/update_monitor), note (a free-form annotation ping — never itself opens or clears an incident). Prefer down/recovery/fail: they fire only on a state change. every-run, success, started, and note are not state changes and are bounded only by how often the monitor runs (or how often the agent chooses to send them), so they can be very chatty, and none of them is flap-damped. started is the chattiest of the bunch for CI-fed monitors: GitHub maps both the workflow_run 'requested' and 'in_progress' webhook events to a start signal, so a single CI run can emit more than one started event — this was observed in production, where a real run logged two starts seconds apart. every-run, success, started, and note share one separate per-channel rate cap (60/hour by default), so together they can no longer use up the budget that down/fail/recovery/blocked need — but a chatty route on any one of the four can silently suppress its own notifications, and its sibling informational types' notifications, once it exceeds that shared cap. blocked is deliberately NOT in that shared group even though it is agent-reported rather than system-derived: a blocked agent needs a human, so it draws on the protected down/fail/recovery budget instead, precisely so it cannot be starved by chatty every-run/success/started/note traffic. Route informational types to a low-stakes destination, not to the one that pages someone."
  3. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations (destructiveHint=true, idempotentHint=true), the description discloses the exact destructive semantics: the whole destination set is replaced, unlisted destinations stop receiving, including ones configured by others, and an empty string clears all routing. It also states auth (write scope) and precondition (destinations must be verified and enabled) details the annotations do not carry.

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?

The prerequisite is front-loaded, followed by purpose, destructive semantics, and practical guidance. Sentences are dense but each earns its place — nothing is redundant with the schema or annotations.

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

Completeness5/5

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

For a destructive replace operation with no output schema, the description covers prerequisites, replacement behavior, empty-value behavior, destination verification requirements, and pointers to related tools. An agent has everything needed to invoke it correctly and safely.

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 already 100%, so the baseline is 3, but the description adds real meaning: channel_ids is a wholesale replacement set rather than an additive list, and an empty value removes routing. This clarifies the mental model of the parameter beyond the schema's plain wording.

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?

The description states a specific verb and resource: it 'Routes a monitor's alerts for one event type to a set of destinations (channels).' This is a distinct, unambiguous purpose that any agent can distinguish from siblings like delete_route or list_destinations without opening a schema.

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?

It gives clear operational context: the write scope requirement, that adding a destination means sending existing ids plus the new one, and that an empty channel_ids removes all routing. It also points to get_monitor and list_destinations for supporting data. It stops short of explicitly naming when to prefer this over delete_route for clearing a route, so it is strong but not fully exhaustive.

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