KosmoKrator

productivity

PagerDuty CLI for AI Agents

Use the PagerDuty CLI from KosmoKrator to call PagerDuty tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

7 functions 7 read 0 write API token auth

PagerDuty CLI Setup

PagerDuty can be configured headlessly with `kosmokrator integrations:configure pagerduty`.

# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure pagerduty --set api_token="$PAGERDUTY_API_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor pagerduty --json
kosmokrator integrations:status --json

Credentials

Authentication type: API token api_token. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
api_token PAGERDUTY_API_TOKEN Secret secret yes API Token
base_url PAGERDUTY_BASE_URL URL url no API Base URL

Call PagerDuty Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call pagerduty.pagerduty_list_incidents '{
  "status": "example_status",
  "urgency": "example_urgency",
  "service_id": "example_service_id",
  "team_id": "example_team_id",
  "limit": 1,
  "offset": 1
}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:pagerduty pagerduty_list_incidents '{
  "status": "example_status",
  "urgency": "example_urgency",
  "service_id": "example_service_id",
  "team_id": "example_team_id",
  "limit": 1,
  "offset": 1
}' --json

Agent Discovery Commands

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

kosmo integrations:docs pagerduty --json
kosmo integrations:docs pagerduty.pagerduty_list_incidents --json
kosmo integrations:schema pagerduty.pagerduty_list_incidents --json
kosmo integrations:search "PagerDuty" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to PagerDuty.

pagerduty.pagerduty_list_incidents

Read read

List PagerDuty incidents. Filter by status (triggered, acknowledged, resolved), urgency (high, low), service ID, or team ID. Returns a paginated list of incidents.

Parameters
status, urgency, service_id, team_id, limit, offset

Generic CLI call

kosmo integrations:call pagerduty.pagerduty_list_incidents '{"status":"example_status","urgency":"example_urgency","service_id":"example_service_id","team_id":"example_team_id","limit":1,"offset":1}' --json

Provider shortcut

kosmo integrations:pagerduty pagerduty_list_incidents '{"status":"example_status","urgency":"example_urgency","service_id":"example_service_id","team_id":"example_team_id","limit":1,"offset":1}' --json

pagerduty.pagerduty_get_incident

Read read

Get full details for a single PagerDuty incident, including status, urgency, assignments, alerts, and timeline.

Parameters
id

Generic CLI call

kosmo integrations:call pagerduty.pagerduty_get_incident '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:pagerduty pagerduty_get_incident '{"id":"example_id"}' --json

pagerduty.pagerduty_list_services

Read read

List PagerDuty services. Optionally filter by team ID. Returns a paginated list of services with status and escalation policy info.

Parameters
team_id, limit, offset

Generic CLI call

kosmo integrations:call pagerduty.pagerduty_list_services '{"team_id":"example_team_id","limit":1,"offset":1}' --json

Provider shortcut

kosmo integrations:pagerduty pagerduty_list_services '{"team_id":"example_team_id","limit":1,"offset":1}' --json

pagerduty.pagerduty_get_service

Read read

Get full details for a single PagerDuty service, including status, escalation policy, integrations, and alert settings.

Parameters
id

Generic CLI call

kosmo integrations:call pagerduty.pagerduty_get_service '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:pagerduty pagerduty_get_service '{"id":"example_id"}' --json

pagerduty.pagerduty_list_teams

Read read

List PagerDuty teams. Returns a paginated list of teams with their names, descriptions, and parent team info.

Parameters
limit, offset

Generic CLI call

kosmo integrations:call pagerduty.pagerduty_list_teams '{"limit":1,"offset":1}' --json

Provider shortcut

kosmo integrations:pagerduty pagerduty_list_teams '{"limit":1,"offset":1}' --json

pagerduty.pagerduty_get_team

Read read

Get full details for a single PagerDuty team, including name, description, parent team, and default role.

Parameters
id

Generic CLI call

kosmo integrations:call pagerduty.pagerduty_get_team '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:pagerduty pagerduty_get_team '{"id":"example_id"}' --json

pagerduty.pagerduty_get_current_user

Read read

Get the profile of the currently authenticated PagerDuty user — name, email, role, time zone, and other account details.

Parameters
none

Generic CLI call

kosmo integrations:call pagerduty.pagerduty_get_current_user '{}' --json

Provider shortcut

kosmo integrations:pagerduty pagerduty_get_current_user '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

pagerduty.pagerduty_list_incidents

List PagerDuty incidents. Filter by status (triggered, acknowledged, resolved), urgency (high, low), service ID, or team ID. Returns a paginated list of incidents.

Operation
Read read
Schema command
kosmo integrations:schema pagerduty.pagerduty_list_incidents --json
ParameterTypeRequiredDescription
status string no Filter by status: "triggered", "acknowledged", or "resolved".
urgency string no Filter by urgency: "high" or "low".
service_id string no Filter by service ID.
team_id string no Filter by team ID.
limit integer no Maximum number of incidents to return (default: 25, max: 100).
offset integer no Offset for pagination (default: 0).

pagerduty.pagerduty_get_incident

Get full details for a single PagerDuty incident, including status, urgency, assignments, alerts, and timeline.

Operation
Read read
Schema command
kosmo integrations:schema pagerduty.pagerduty_get_incident --json
ParameterTypeRequiredDescription
id string yes The incident ID (e.g., "Q02JTSZO2VGFBH").

pagerduty.pagerduty_list_services

List PagerDuty services. Optionally filter by team ID. Returns a paginated list of services with status and escalation policy info.

Operation
Read read
Schema command
kosmo integrations:schema pagerduty.pagerduty_list_services --json
ParameterTypeRequiredDescription
team_id string no Filter services by team ID.
limit integer no Maximum number of services to return (default: 25, max: 100).
offset integer no Offset for pagination (default: 0).

pagerduty.pagerduty_get_service

Get full details for a single PagerDuty service, including status, escalation policy, integrations, and alert settings.

Operation
Read read
Schema command
kosmo integrations:schema pagerduty.pagerduty_get_service --json
ParameterTypeRequiredDescription
id string yes The service ID (e.g., "PIJ90N7").

pagerduty.pagerduty_list_teams

List PagerDuty teams. Returns a paginated list of teams with their names, descriptions, and parent team info.

Operation
Read read
Schema command
kosmo integrations:schema pagerduty.pagerduty_list_teams --json
ParameterTypeRequiredDescription
limit integer no Maximum number of teams to return (default: 25, max: 100).
offset integer no Offset for pagination (default: 0).

pagerduty.pagerduty_get_team

Get full details for a single PagerDuty team, including name, description, parent team, and default role.

Operation
Read read
Schema command
kosmo integrations:schema pagerduty.pagerduty_get_team --json
ParameterTypeRequiredDescription
id string yes The team ID (e.g., "PIMJOGV").

pagerduty.pagerduty_get_current_user

Get the profile of the currently authenticated PagerDuty user — name, email, role, time zone, and other account details.

Operation
Read read
Schema command
kosmo integrations:schema pagerduty.pagerduty_get_current_user --json
ParameterTypeRequiredDescription
No parameters.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.