Skip to main content
Glama

set_route

DestructiveIdempotent

Route a monitor's alerts for one event type to chosen destinations, replacing the whole set. Include existing channel IDs to add; empty channel_ids clears routing.

Instructions

Requires an API key with the write scope or higher. Route a monitor's alerts for one event type to a set of destinations (channels). THIS REPLACES THE WHOLE SET for that event type — every destination you leave out stops receiving that event, including ones somebody else configured. CALL get_monitor FIRST and read its routes field: that is the monitor's current routing, and adding a destination means passing the existing ids PLUS the new one. Pass an empty channel_ids to remove all routing for the event. Destinations must be verified and enabled (email destinations must be confirmed first). Use list_destinations for IDs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
event_typeYesOne 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.
monitor_idYesMonitor (check) UUID.
channel_idsNoComma-separated destination (channel) UUIDs to notify. Empty string clears the route.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations declare destructiveHint: true and readOnlyHint: false, but the description goes much further, explicitly warning that 'every destination you leave out stops receiving that event, including ones somebody else configured.' It also discloses the authentication requirement (write scope) and the need for destinations to be verified/enabled. No contradiction with annotations; the description enriches the behavioral profile.

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 description is a single, dense paragraph where every sentence earns its place: the action is front-loaded, the critical destructive warning is highlighted in caps, and each subsequent sentence provides a necessary instruction (prerequisite, ID retrieval, edge case, validation). There is no fluff; the structure guides the agent from understanding to execution.

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 mutating tool with no output schema, this description covers all essential operational context: prerequisites (call get_monitor first), how to compute the correct channel_ids, the effect of empty input, destination verification requirements, and where to get IDs. Nothing an agent needs to call this tool correctly and safely is missing.

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 100% for all three parameters, so the baseline is 3. The description adds beyond the schema by instructing agents to pass existing IDs plus new ones, emphasizing that channel_ids replaces the whole set, and noting that destinations must be verified and enabled. This extra context helps agents avoid mistakes that the schema alone would not prevent.

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 clearly states the tool's purpose: 'Route a monitor's alerts for one event type to a set of destinations (channels).' It further clarifies the critical behavior that it replaces the entire set, which distinguishes it from any additive routing tools and gives the agent an accurate mental model. The description also points to related tools (get_monitor, list_destinations) that help the agent understand its role in the workflow.

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

Usage Guidelines5/5

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

The description provides explicit procedural guidance: 'CALL get_monitor FIRST and read its `routes` field' and 'Use list_destinations for IDs.' It explains when to use the tool (to set routing) and precisely how to construct the channel_ids by preserving existing IDs plus new ones. It also covers the empty-input edge case for clearing routing. This is actionable and unambiguous.

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