Skip to main content
Glama

Update Alert Rule

update_alert_rule
DestructiveIdempotent

Reconfigure or toggle one alert rule, predefined or custom.

ref decides which: a kind name (consistent_error_pattern, swallowed_error, tool_loop, context_rot) addresses the predefined rule of that kind; a uuid addresses a custom rule. Get either from list_alert_rules.

Only what you pass changes. Turning a rule off stops detection, not just notification — gaps in history are permanent and nothing backfills them.

The two rule shapes take DIFFERENT settings, and mixing them is refused with a message naming the right one:

  • a predefined rule has named integer knobs -> pass config

  • a custom rule has metric thresholds -> pass rules (+ window_minutes)

ref: the rule's kind or uuid. enabled: turn detection on or off. rca_enabled: turn root-cause analysis on or off for this rule. name: rename a custom rule (predefined rules take their name from their kind). config: for a PREDEFINED rule only — its named knobs, e.g. {"min_errored_spans": 10}. consistent_error_pattern takes window_minutes, min_errored_spans, min_distinct_traces; swallowed_error takes window_minutes, min_errored_spans. tool_loop takes window_minutes, min_identical_calls (3-100000, identical calls in one run that make a loop), exclude_retries (0 off, 1 on, the default: a call that errored ends the loop and does not count, so a retry is not a loop) and polling_as_info (0 off, 1 on, the default: a loop whose calls come at a near-regular interval is written as an info finding, likely polling, and alerts nobody; set 0 to alert on polling too) and session_scope (0 off, the default, 1 on: the runs of one session are read as one sequence, so the same call repeated across consecutive runs of a session is a loop too; a run boundary does not end the sequence, a pause of over five minutes does; the finding lands on the run that completed the loop). context_rot takes window_minutes plus: max_context_usage_pct (1-100, how full the window may get), critical_context_usage_pct (1-100, the critical level; the server requires it to be at least max_context_usage_pct), max_tool_share_pct (1-100, the share of the context one tool's results may take), sustain_calls (1-20, how many LLM calls a condition must hold for), min_drop_pct (10-95, the smallest fall in prompt size, in percent, that counts as a drop), detect_history_loss, detect_cutoff and detect_thrashing (0 off, 1 on; true and false are accepted), thrash_compactions (2-10, consecutive automatic compactions that count as thrashing; a manual compaction breaks the chain) and thrash_calls (1-50, the most LLM calls between two compactions for the second to count as following the first). Call describe_alert_catalog for the bounds. rules: for a CUSTOM rule only — replace its thresholds. Replaces the whole list, so pass window_minutes with it. window_minutes: the window. For a custom rule it is part of the replaced config, so pass rules too; for a predefined rule put it in config. filters: for a CUSTOM rule only — replace its filters. Replaces the whole list. Same shape and the same verbatim-value rule as create_alert_rule. channel_ids: change where the rule delivers. Needs channels:manage. An empty list does NOT silence the rule — it re-points it at the region's default webhook. To stop notifications, set enabled to false. workspace: optional workspace id, name, or org-name/workspace-name when the same name occurs in two of your orgs (defaults to your default).

Example:

Turn off the tool loop alert.

{ "name": "update_alert_rule", "arguments": { "ref": "tool_loop", "enabled": false } }

Example:

Alert me on polling loops too, and only after 5 identical calls.

{ "name": "update_alert_rule", "arguments": {
    "ref": "tool_loop",
    "config": { "polling_as_info": 0, "min_identical_calls": 5 }
} }

Example:

Make the error pattern alert less noisy — 10 errors, not 3.

{ "name": "update_alert_rule", "arguments": {
    "ref": "consistent_error_pattern",
    "config": { "min_errored_spans": 10 }
} }

Example:

Flag an agent that compacts three times in a row, within 5 calls of each other.

{ "name": "update_alert_rule", "arguments": {
    "ref": "context_rot",
    "config": { "detect_thrashing": 1, "thrash_compactions": 3, "thrash_calls": 5 }
} }

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "ref": "<ref>"
    },
    "name": "update_alert_rule"
  }
}

Input Schema

NameRequiredDescriptionDefault
refYes
nameNo
rulesNo
configNo
enabledNo
filtersNo
workspaceNo
channel_idsNo
rca_enabledNo
window_minutesNo

Output Schema

NameRequiredDescriptionDefault
resultYes

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?

Beyond the annotations (destructiveHint=true, idempotentHint=true), it discloses the real consequence of the destructive path: turning a rule off stops detection, and 'gaps in history are permanent and nothing backfills them.' It also surfaces a permission requirement ('Needs `channels:manage`') and the surprising default-webhook fallback for an empty channel_ids list.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the discriminator and the destructive warning, then a parameter reference, then four worked examples that map natural-language intent to arguments. It is long, but the length is largely earned by ten undocumented parameters; a few passages (window_minutes explained twice, nested parentheticals in the tool_loop/context_rot knobs) could be tightened.

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?

Output schema exists so return values need no prose. Given a 10-parameter, branching mutation tool with annotations that only flag destructiveness, the description supplies the mutation scope, cross-tool dependencies, permissions, and per-kind constraints an agent needs to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description carries the full burden — and it does, documenting all ten parameters, the mutual exclusivity of `config` vs `rules`, replacement semantics for `rules`/`filters`, why window_minutes must accompany `rules`, and per-kind knob names, ranges and defaults for every predefined rule.

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?

States a specific verb and resource ('Reconfigure or toggle one alert rule') and immediately disambiguates the two rule families via the `ref` discriminator (kind name vs uuid). It distinguishes itself from create_alert_rule/list_alert_rules in the same breath.

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?

Explicitly routes the agent: 'Get either from list_alert_rules' for the ref, and 'Call describe_alert_catalog for the bounds.' It also tells when NOT to do something — 'To stop notifications, set enabled to false' rather than emptying channel_ids.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.