Claude
Skills
Sign in
Back

pagerduty-helper

Included with Lifetime
$97 forever

Complete PagerDuty operations via REST API - incidents, schedules, oncall, services, orchestrations When user mentions PagerDuty, incidents, oncall, schedules, escalation, pages, alerts

Backend & APIs

What this skill does


# PagerDuty Helper Agent

## Overview

Complete PagerDuty operations via REST API. This skill replaces PagerDuty MCP server functionality, providing API equivalents for all operations.

## MCP Tool Equivalents Reference

| MCP Tool                          | API Equivalent                                               |
| --------------------------------- | ------------------------------------------------------------ |
| `list_incidents`                  | `curl "$API/incidents"`                                      |
| `get_incident`                    | `curl "$API/incidents/{id}"`                                 |
| `get_outlier_incident`            | `curl "$API/incidents/{id}/outlier_incident"`                |
| `get_past_incidents`              | `curl "$API/incidents/{id}/past_incidents"`                  |
| `get_related_incidents`           | `curl "$API/incidents/{id}/related_incidents"`               |
| `list_incident_notes`             | `curl "$API/incidents/{id}/notes"`                           |
| `list_incident_workflows`         | `curl "$API/incident_workflows"`                             |
| `get_incident_workflow`           | `curl "$API/incident_workflows/{id}"`                        |
| `list_services`                   | `curl "$API/services"`                                       |
| `get_service`                     | `curl "$API/services/{id}"`                                  |
| `list_teams`                      | `curl "$API/teams"`                                          |
| `get_team`                        | `curl "$API/teams/{id}"`                                     |
| `list_team_members`               | `curl "$API/teams/{id}/members"`                             |
| `list_users`                      | `curl "$API/users"`                                          |
| `get_user_data`                   | `curl "$API/users/me"`                                       |
| `list_schedules`                  | `curl "$API/schedules"`                                      |
| `get_schedule`                    | `curl "$API/schedules/{id}"`                                 |
| `list_schedule_users`             | `curl "$API/schedules/{id}/users"`                           |
| `list_oncalls`                    | `curl "$API/oncalls"`                                        |
| `list_escalation_policies`        | `curl "$API/escalation_policies"`                            |
| `get_escalation_policy`           | `curl "$API/escalation_policies/{id}"`                       |
| `list_event_orchestrations`       | `curl "$API/event_orchestrations"`                           |
| `get_event_orchestration`         | `curl "$API/event_orchestrations/{id}"`                      |
| `get_event_orchestration_router`  | `curl "$API/event_orchestrations/{id}/router"`               |
| `get_event_orchestration_service` | `curl "$API/event_orchestrations/services/{service_id}"`     |
| `get_event_orchestration_global`  | `curl "$API/event_orchestrations/{id}/global"`               |
| `list_alert_grouping_settings`    | `curl "$API/alert_grouping_settings"`                        |
| `get_alert_grouping_setting`      | `curl "$API/alert_grouping_settings/{id}"`                   |
| `list_change_events`              | `curl "$API/change_events"`                                  |
| `get_change_event`                | `curl "$API/change_events/{id}"`                             |
| `list_service_change_events`      | `curl "$API/services/{id}/change_events"`                    |
| `list_incident_change_events`     | `curl "$API/incidents/{id}/related_change_events"`           |
| `list_status_pages`               | `curl "$API/status_pages"`                                   |
| `list_status_page_severities`     | `curl "$API/status_pages/{id}/severities"`                   |
| `list_status_page_impacts`        | `curl "$API/status_pages/{id}/impacts"`                      |
| `list_status_page_statuses`       | `curl "$API/status_pages/{id}/statuses"`                     |
| `get_status_page_post`            | `curl "$API/status_pages/{id}/posts/{post_id}"`              |
| `list_status_page_post_updates`   | `curl "$API/status_pages/{id}/posts/{post_id}/post_updates"` |

## Configuration

```bash
# Set environment variables
export PAGERDUTY_TOKEN="your-api-token"
export API="https://api.pagerduty.com"

# Standard headers
AUTH="Authorization: Token token=$PAGERDUTY_TOKEN"
ACCEPT="Accept: application/vnd.pagerduty+json;version=2"
CONTENT="Content-Type: application/json"

# Test connection
curl -H "$AUTH" -H "$ACCEPT" "$API/users/me"
```

---

## Incident Operations

### List Incidents

```bash
# All incidents
curl -H "$AUTH" -H "$ACCEPT" "$API/incidents"

# Filter by status
curl -H "$AUTH" -H "$ACCEPT" \
  "$API/incidents?statuses[]=triggered&statuses[]=acknowledged"

# Filter by service
curl -H "$AUTH" -H "$ACCEPT" "$API/incidents?service_ids[]=$SERVICE_ID"

# Filter by team
curl -H "$AUTH" -H "$ACCEPT" "$API/incidents?team_ids[]=$TEAM_ID"

# Filter by date range
curl -H "$AUTH" -H "$ACCEPT" \
  "$API/incidents?since=2024-01-01T00:00:00Z&until=2024-01-31T23:59:59Z"

# Filter by urgency
curl -H "$AUTH" -H "$ACCEPT" "$API/incidents?urgencies[]=high"

# Sort and limit
curl -H "$AUTH" -H "$ACCEPT" \
  "$API/incidents?sort_by=created_at:desc&limit=10"

# JSON output
curl -H "$AUTH" -H "$ACCEPT" "$API/incidents" | \
  jq '.incidents[] | {id, title, status, urgency, created_at}'
```

### Get Incident Details

```bash
curl -H "$AUTH" -H "$ACCEPT" "$API/incidents/$INCIDENT_ID"

# With additional info
curl -H "$AUTH" -H "$ACCEPT" \
  "$API/incidents/$INCIDENT_ID?include[]=acknowledgers&include[]=assignees"
```

### Get Outlier Incident

```bash
# Get outlier analysis for an incident
curl -H "$AUTH" -H "$ACCEPT" \
  "$API/incidents/$INCIDENT_ID/outlier_incident"

# With time range
curl -H "$AUTH" -H "$ACCEPT" \
  "$API/incidents/$INCIDENT_ID/outlier_incident?since=2024-01-01T00:00:00Z"
```

### Get Past Incidents

```bash
# Get similar past incidents
curl -H "$AUTH" -H "$ACCEPT" "$API/incidents/$INCIDENT_ID/past_incidents"

# With limit
curl -H "$AUTH" -H "$ACCEPT" \
  "$API/incidents/$INCIDENT_ID/past_incidents?limit=5"
```

### Get Related Incidents

```bash
curl -H "$AUTH" -H "$ACCEPT" "$API/incidents/$INCIDENT_ID/related_incidents"

# With additional details
curl -H "$AUTH" -H "$ACCEPT" \
  "$API/incidents/$INCIDENT_ID/related_incidents?additional_details[]=incident"
```

### List Incident Notes

```bash
curl -H "$AUTH" -H "$ACCEPT" "$API/incidents/$INCIDENT_ID/notes"

# Add a note
curl -X POST -H "$AUTH" -H "$ACCEPT" -H "$CONTENT" \
  -H "From: [email protected]" \
  "$API/incidents/$INCIDENT_ID/notes" \
  -d '{
    "note": {
      "content": "Investigation update: found the root cause"
    }
  }'
```

### Acknowledge/Resolve Incident

```bash
# Acknowledge
curl -X PUT -H "$AUTH" -H "$ACCEPT" -H "$CONTENT" \
  -H "From: [email protected]" \
  "$API/incidents/$INCIDENT_ID" \
  -d '{
    "incident": {
      "type": "incident_reference",
      "status": "acknowledged"
    }
  }'

# Resolve
curl -X PUT -H "$AUTH" -H "$ACCEPT" -H "$CONTENT" \
  -H "From: [email protected]" \
  "$API/incidents/$INCIDENT_ID" \
  -d '{
    "incident": {
      "type": "incident_reference",
      "status": "resolved"
    }
  }'
```

---

## Service Operations

### List Services

```bash
# All services
curl -H "$AUTH" -H "$ACCEPT" "$API/services"

# Search by name
curl -H "$AUTH" -H "$ACCEPT" "$API/services?query=production"

# Filter by team
curl -H "$AUTH" -H "$ACCEPT" "$API/services?team_ids[]=$TEAM_ID"

# Include integrations
curl -H "$AUTH" -H "$ACCEPT" \
  "$API/services?include[]=integrations&include[]=escalation_policies"

# JSON output
curl -H "$AUTH" -H "$ACCEPT" "$API/services" | \
  jq '.services[] | {id, name, status, description}'
```

### Get Service Details

```bash
curl -H "$AUTH" -H "$ACCEPT" "$API/services/$SERVICE_ID"

# With integrations
curl -H "$AUTH

Related in Backend & APIs