Skip to main content
Glama
Sentry MCP

Sentry MCP

Official
by getsentry

Create Metric Monitor

create_metric_monitor

Create a Sentry Metric Monitor that detects when error count, latency, or other metrics cross static, percent-change, or dynamic thresholds; monitors start active.

Instructions

Create a Sentry Metric Monitor that detects when a metric, such as an error count or latency, crosses a static, percent-change, or dynamic threshold. New monitors start active. Copy a monitor's setup from get_metric_monitor_details. Notifications come from Alerts: create_alert_rule. Cron jobs: find_monitors. URL checks: find_uptime_monitors. Creation can persist before an error or timeout; check find_metric_monitors before retrying.

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": {
      "projectSlug": "<projectSlug>",
      "name": "<name>",
      "query": "<query>",
      "config": "<config>",
      "conditionGroup": "<conditionGroup>"
    },
    "name": "create_metric_monitor"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
ownerNoOwner as user:<id> or team:<id>. Null clears it.
queryYesComplete metric query. Omit environment for all environments.
configYesDetection mode: Static thresholds, Percent change against an earlier window (needs comparisonDeltaSeconds), or Dynamic anomaly detection (needs enough history).
regionUrlNo
descriptionNo
projectSlugYesThe project slug. In `org/project` notation, the part after the slash.
workflowIdsNoAlert workflow IDs to connect, from find_alert_rules with `issue`. Omit to create with no Alerts.
conditionGroupYesComplete detection conditions; copied IDs are dropped. Static and Percent use threshold conditions, including a resolved one. Dynamic uses one anomaly_detection condition.
organizationSlugNoThe organization slug, from `find_organizations`. In `org/project` notation, the part before the slash.

Output Schema

NameRequiredDescriptionDefault
monitorYes
guidanceNo

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?

Adds context beyond the annotations: monitors start active, copied condition IDs are dropped, and creation can persist before an error/timeout so find_metric_monitors should be checked before retrying. The retry warning meaningfully elaborates on idempotentHint=false. It stops short of stating permission or rate-limit requirements.

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?

Five short sentences, front-loaded with purpose, then prerequisites, sibling routing, and the retry caveat. Every sentence carries information; the sibling list is terse but not padded.

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 10-parameter nested mutation tool with an output schema, the description covers what is created, its initial state, required setup sources, notification linkage, and the non-idempotent retry risk. Return values are handled by the output schema, so nothing essential 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 70% and the nested query/config/conditionGroup fields already carry detailed descriptions, including the detection modes and threshold semantics. The description mostly restates those modes rather than adding new parameter-level meaning, so the baseline 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 ('Create a Sentry Metric Monitor') plus what it detects (metric crossing a static, percent-change, or dynamic threshold) and the initial state ('New monitors start active'). It also implicitly separates this from cron and uptime monitors by naming those siblings in the next sentence.

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: copy setup from get_metric_monitor_details, wire notifications via create_alert_rule, and use find_monitors / find_uptime_monitors for cron and URL-check monitors. That gives both the precondition and the conditions that select alternative tools.

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