Skip to main content
Glama

Set alert template

set_alert_template
DestructiveIdempotent

Set or clear one alert template per monitor event type or cause without affecting others. Validates variables; empty resets to default.

Instructions

Requires the write scope or higher. Sets or clears one alert message template on a monitor; every other template is kept (read-modify-write). The template is validated for allowed variables before saving, and an empty template resets that entry to the built-in default. Event types: 'down', 'recovery', 'fail', 'every-run', 'success', 'started', 'blocked', 'note'. The template argument lists the variables.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesMonitor UUID.
causeNoOptional cause for a per-cause override (e.g. 'silence', 'overrun', 'never_started', 'stalled', 'runaway', 'upstream'). Omitted or empty: an event-type-wide template.
templateYesTemplate text with {variable} placeholders; an empty string resets to the built-in default. Variables: {check_name}, {event}, {status}, {cause}, {last_ping}, {schedule}, {incident_url}, {run_url}, {branch}, {commit}, {actor}, {failing_stage}, {duration}, {latency}, {status_code}, {url}, {last_step}, {step_count}, {run_duration}, {body}, {detail}, {title}. {failing_stage}: CI only; GitLab, GitHub when the webhook subscribes to workflow_job, not Jenkins. {body} is the triggering ping's text, which carries a 'blocked' or 'note' reason. {title} is the run's title (its /start body or /title), filled for 'fail', 'stalled' and 'overrun' when the run is identified; else empty.
event_typeYesEvent type: 'down', 'recovery', 'fail', 'every-run', 'success', 'started', 'blocked', 'note'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.17
    • changedInput schema / properties / cause / description
      Previous value: -"Optional cause for a per-cause override (e.g. 'silence', 'overrun', 'never_started', 'stalled', 'runaway', 'upstream'). Omit or leave empty for an event-type-wide template."New value: +"Optional cause for a per-cause override (e.g. 'silence', 'overrun', 'never_started', 'stalled', 'runaway', 'upstream'). Omitted or empty: an event-type-wide template."
    • changedInput schema / properties / template / description
      Previous value: -"Template text with {variable} placeholders. Empty string resets to the built-in default."New value: +"Template text with {variable} placeholders; an empty string resets to the built-in default. Variables: {check_name}, {event}, {status}, {cause}, {last_ping}, {schedule}, {incident_url}, {run_url}, {branch}, {commit}, {actor}, {failing_stage}, {duration}, {latency}, {status_code}, {url}, {last_step}, {step_count}, {run_duration}, {body}, {detail}, {title}. {failing_stage}: CI only; GitLab, GitHub when the webhook subscribes to workflow_job, not Jenkins. {body} is the triggering ping's text, which carries a 'blocked' or 'note' reason. {title} is the run's title (its /start body or /title), filled for 'fail', 'stalled' and 'overrun' when the run is identified; else empty."
  2. Changed1 schema field changedv0.1.9
    • changedInput schema / properties / cause / description
      Previous value: -"Optional cause for a per-cause override (e.g. 'silence', 'overrun', 'never_started', 'stalled', 'runaway'). Omit or leave empty for an event-type-wide template."New value: +"Optional cause for a per-cause override (e.g. 'silence', 'overrun', 'never_started', 'stalled', 'runaway', 'upstream'). Omit or leave empty for an event-type-wide template."
  3. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing the write-scope auth requirement, the read-modify-write semantics ('every other template is kept'), pre-save validation of allowed variables, and the reset-to-default behavior on empty input. It also usefully clarifies that the destructiveHint applies only to the single targeted entry, not the whole template set.

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?

Auth requirement and behavior are front-loaded, followed by validation, reset semantics, and event types. The trailing 'The template argument lists the variables' sentence is largely redundant with the schema's parameter descriptions and is the one line that does not fully earn its place.

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 mutation tool with no output schema, the description covers everything an agent needs: auth scope, idempotency implications, partial-write behavior, validation failure mode, default-reset behavior, and the enumerated event types. Nothing essential to correct invocation is missing.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents every parameter including the variable list and cause overrides. The description's 'The template argument lists the variables' merely points back at the schema rather than adding format or syntax detail, so the baseline 3 applies.

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 ('Sets or clears one alert message template on a monitor') and scopes it to a single entry. It is clearly distinguishable from the sibling get_alert_templates reader without opening either 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?

Explains when behavior applies: empty string resets to built-in default, cause omitted means event-type-wide, and the write-scope prerequisite is stated. It does not explicitly name get_alert_templates as the read counterpart or state when not to use this tool, so it stops short of routing-level guidance.

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