Authenticate with a Sentry auth token having 'project:write' scope and identify the organization slug and project slug
POST to 'https://sentry.io/api/0/projects/{org_slug}/{project_slug}/rules/' with Content-Type: application/json
Construct the request body with 'name', 'actionMatch' ('all' or 'any'), 'conditions' array (e.g. '{"id": "sentry.rules.conditions.first_seen_event.FirstSeenEventCondition"}'), 'filters' array, and 'actions' array
Specify an action such as email notification with '{"id": "sentry.mail.actions.NotifyEmailAction", "targetType": "Team", "targetIdentifier": "<team_id>"}' or a webhook action for external integrations
List existing rules with GET to the same endpoint and update with PUT to '/api/0/projects/{org_slug}/{project_slug}/rules/{rule_id}/'
Known gotchas
Condition, filter, and action IDs are fully-qualified Python class paths; even a minor typo returns a 400 with an unhelpful 'Invalid rule' message — copy IDs exactly from the Sentry docs or existing rules
Alert rules are project-scoped; a rule must be created per-project and cannot be shared across projects in the same organization without separate API calls
The 'frequency' field sets the minimum time between repeated alerts for the same issue; setting it too low can generate alert floods for high-frequency errors
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp