Skip to main content
Glama

set_alert_template

DestructiveIdempotent

Set or clear an alert message template for a monitor event, with optional per-cause override and validated variables. Empty template resets to built-in default while preserving other templates.

Instructions

Set or clear a single alert message template on a monitor. The template is validated for allowed variables before saving. Pass an empty string for template to reset that entry to the built-in default. All other existing templates are preserved (read-modify-write). Available 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}. {failing_stage} is CI-only and provider-dependent: always populated on GitLab; on GitHub only if the repository webhook also subscribes to the workflow_job event; never on Jenkins, whose Notification Plugin payload carries no step detail. {body} is the triggering ping's own text (pings.body_excerpt) — it is how a 'blocked' or 'note' event's reason reaches the alert, and a custom template is the only way to control where in the message it appears.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesMonitor UUID.
causeNoOptional cause for a per-cause override (e.g. 'silence', 'overrun', 'never_started', 'stalled', 'runaway'). Omit or leave empty for an event-type-wide template.
templateYesTemplate text with {variable} placeholders. Empty string resets to the built-in default.
event_typeYesEvent type: 'down', 'recovery', 'fail', 'every-run', 'success', 'started', 'blocked', 'note'.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

The description goes far beyond the annotations. It discloses validation against allowed variables, the reset-to-default behavior for empty strings, the read-modify-write merge behavior that preserves other templates, and detailed provider-dependent caveats for {failing_stage} and {body}. Annotations already include destructiveHint=true and idempotentHint=true, and the description is fully consistent with those traits rather than contradicting them.

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?

The description is long, but nearly every sentence earns its place by explaining validation, reset semantics, read-modify-write behavior, variable availability, and provider caveats. The main sentence is front-loaded with the core purpose before diving into details. The variable list could arguably be shortened, but it is immediately useful and not redundant.

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 and a moderately complex template parameter, the description covers side effects, concurrency behavior, validation requirements, reset semantics, and important environment-specific variable limitations. There are no significant gaps that would prevent an agent from using the tool correctly.

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%, so the baseline is 3, but the description adds substantial value beyond the schema: it enumerates all allowed template variables, explains the semantic meaning of {body} via pings.body_excerpt, and details CI-provider behavior for {failing_stage}. This materially improves the agent's ability to construct a valid template parameter.

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 opens with a specific verb-plus-resource statement: 'Set or clear a single alert message template on a monitor.' It clearly distinguishes this from the read-only sibling get_alert_templates by emphasizing 'set or clear' and 'single' template, so an agent can immediately identify the operation.

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?

The description gives clear operational context: when to pass an empty string, that this is a read-modify-write preserving other templates, and that a custom template is the only way to control where {body} appears. It does not explicitly name an alternative tool such as get_alert_templates for reading, but the contrast is strongly implied and the context is sufficient for selection.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tp322d/lastping-app'

If you have feedback or need assistance with the MCP directory API, please join our Discord server