Skip to main content
Glama
Sentry MCP

Sentry MCP

Official
by getsentry

Get Alert Rule

get_alert_rule
Read-only

Retrieve a Sentry alert rule by ID or exact name to inspect its triggers, conditions, notification actions, connected monitors, and project scope.

Instructions

Get one Sentry alert rule by ID or exact name: its triggers, conditions, notification actions, connected monitors, and project scope. Prefer get_metric_monitor_details for Metric Monitors; cron and uptime monitors have their own get tools.

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": {
      "ruleIdOrName": "<ruleIdOrName>"
    },
    "name": "get_alert_rule"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindNoAlert family: `issue` for Alerts (workflows), `metric` for Metric Monitors. `all` matches by exact name only.all
freshNoBypass cached reads.
regionUrlNo
projectSlugNo
ruleIdOrNameYesAlert ID or exact name. With `metric`, a number is a legacy alert-rule ID; use detector:<id> for a Metric Monitor ID. With `all`, digits are matched as a name.
organizationSlugNoThe organization slug, from `find_organizations`. In `org/project` notation, the part before the slash.

Output Schema

NameRequiredDescriptionDefault
guidanceNo
alertRuleNoSet when the match is an Issue Alert.
metricMonitorNoSet when the match is a Metric Monitor.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.1

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=true, so safety is covered; the description adds the useful detail that a rule carries triggers, conditions, notification actions, connected monitors and project scope. It says nothing about behavior the agent would want to know for this tool specifically — what happens when no rule matches the name, how name collisions resolve, or that fresh bypasses cached reads (that hint lives only in the schema).

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?

Two sentences, front-loaded with the action and the returned content, then the routing caveat. No filler, no restatement of the title, and the exclusion is placed where an agent will read it before committing.

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?

With an output schema present, the description needn't enumerate return fields, and it still covers purpose, lookup keys and sibling routing for a 6-parameter read tool. The gaps are the unresolved kind='metric' vs 'prefer get_metric_monitor_details' ambiguity and no word on not-found behavior for an exact-name lookup.

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 67% and the per-parameter descriptions are detailed (kind enum, detector:<id> syntax, regionUrl source, projectSlug 'all'). The description only restates 'ID or exact name' and gestures at the kind distinction via the Metric Monitor routing note, adding little syntax or format meaning beyond the schema — the adequate baseline.

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?

A specific verb and resource ('Get one Sentry alert rule by ID or exact name') followed by the exact payload the agent receives: triggers, conditions, notification actions, connected monitors, project scope. It also names which sibling handles adjacent resource types, so the agent can distinguish it from get_metric_monitor_details and the monitor getters without opening a 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?

Explicitly routes the agent away from this tool for Metric Monitors and notes that cron/uptime monitors have their own get tools, which is real when/when-not guidance. The remaining friction is internal: the schema still accepts kind='metric' for Metric Monitors while the description says to prefer another tool, leaving the agent unsure which path wins.

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