Skip to main content
Glama
Sentry MCP

Sentry MCP

Official
by getsentry

Create Alert Rule

create_alert_rule

Creates a Sentry notification workflow that sends Slack, email, PagerDuty, or other alerts when connected issue streams or monitors trigger.

Instructions

Create a Sentry Alert (notification workflow) that sends Slack, email, PagerDuty, or other notifications when its connected issue streams or monitors trigger. get_alert_options lists valid actions, conditions, and sources; update_alert_rule adds sources to an existing Alert. Monitors are separate tools: find_metric_monitors (metric thresholds), find_monitors (cron jobs), find_uptime_monitors (URL checks). After a timeout or error, search for the Alert before retrying: it may already exist.

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": {
      "name": "<name>",
      "actionFilters": "<actionFilters>"
    },
    "name": "create_alert_rule"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
ownerNoOwner as user:<id> or team:<id>. Null clears it.
statusNoactive
triggersNo
regionUrlNo
detectorIdsNoMonitor source IDs from get_alert_options. Pass [] for an Alert with no sources; it sends nothing until connected. An all-project source also needs org:write.
environmentNoEnvironment the Alert applies to. Null means all environments.
projectSlugsNoProjects whose issue streams to connect. Set this, detector IDs, or both.
actionFiltersYesAction groups with conditions and notification actions, from get_alert_options or copied from get_alert_rule. Component IDs are dropped; integration and destination IDs are kept. Pass [] for none.
frequencyMinutesNoMinimum interval between notifications, in minutes.
organizationSlugNoThe organization slug, from `find_organizations`. In `org/project` notation, the part before the slash.

Output Schema

NameRequiredDescriptionDefault
guidanceNo
alertRuleYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.1

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false, openWorldHint=true, so the mutation/external-side-effect profile is partly covered. The description adds genuinely non-derivable behavior: creation is not safely repeatable and may have partially succeeded on timeout, so the agent must search before retrying. It does not discuss authentication or permission requirements beyond what the schema states (org:write for all-project sources).

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?

Four sentences, front-loaded with the core verb and resource, then alternatives, then a distinct entity class, then the retry caveat. No filler and no repetition of structured field data.

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

Completeness4/5

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

For an 11-parameter mutation tool this covers the main agent risks: which sources to gather first, what it is not (a monitor), and the non-idempotent retry hazard. With annotations and an output schema present, the remaining gap — required-field expectations (name, actionFilters) and the consequences of an empty detectorIds list, which only the schema states — is modest.

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 64% and the schema already carries detailed inline docs for name-adjacent fields like detectorIds, projectSlugs, actionFilters, and provider config targeting. The description adds no field-level meaning beyond pointing at get_alert_options for source IDs, so the schema does the heavy lifting — a baseline 3.

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 ("Create a Sentry Alert (notification workflow)") plus its function — sending Slack, email, PagerDuty notifications when connected issue streams or monitors fire. It also explicitly distinguishes itself from the monitor-creation siblings (find_metric_monitors, find_monitors, find_uptime_monitors), so an agent can tell which entity is being created.

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?

Names the prerequisite discovery tool (get_alert_options for valid actions/conditions/sources), the follow-on mutation tool (update_alert_rule for adding sources to an existing Alert), and the monitor-specific alternatives with a one-line reason for each. It also gives explicit retry guidance: after a timeout or error, search for the Alert before retrying.

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