Create Metric Monitor
create_metric_monitorCreate 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
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| owner | No | Owner as user:<id> or team:<id>. Null clears it. | |
| query | Yes | Complete metric query. Omit environment for all environments. | |
| config | Yes | Detection mode: Static thresholds, Percent change against an earlier window (needs comparisonDeltaSeconds), or Dynamic anomaly detection (needs enough history). | |
| regionUrl | No | ||
| description | No | ||
| projectSlug | Yes | The project slug. In `org/project` notation, the part after the slash. | |
| workflowIds | No | Alert workflow IDs to connect, from find_alert_rules with `issue`. Omit to create with no Alerts. | |
| conditionGroup | Yes | Complete detection conditions; copied IDs are dropped. Static and Percent use threshold conditions, including a resolved one. Dynamic uses one anomaly_detection condition. | |
| organizationSlug | No | The organization slug, from `find_organizations`. In `org/project` notation, the part before the slash. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| monitor | Yes | ||
| guidance | No |