get_oncalls
List current or scheduled PagerDuty on-call entries by schedule, escalation policy, user, or time range to see who is on call.
Instructions
List on-call entries for schedules, policies, or time ranges.
Call patterns:
Default: omit exclusive filters (uses escalation policies the current user is a target of).
By schedule:
schedule_idsmay be used with the default context (intersection) or withcurrent_user_context=False.By user/policy IDs: pass
user_idsand/orescalation_policy_ids(impliescurrent_user_context=False, including overriding an explicit True).
Behavior varies by time parameters:
Without since/until: Returns current on-calls Example: get_oncalls(current_user_context=False, schedule_ids=["PSCHED123"])
With since/until: Returns all on-calls in range Example: get_oncalls(current_user_context=False, schedule_ids=["PSCHED123"], since="2024-03-20T00:00:00Z", until="2024-03-27T00:00:00Z")
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_oncalls"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max results (optional) | |
| since | No | Start of query range in ISO8601 format (default: current datetime) | |
| until | No | End of query range in ISO8601 format (default: current datetime, max range: 90 days in the future). Cannot be before `since`. | |
| include | No | List of fields to include in the response. If specified, only these fields will be returned for each on-call entry | |
| earliest | No | Only earliest on-call per policy/level/user combo (optional) | |
| user_ids | No | Filter by users (optional). Providing this parameter implies `current_user_context=False` (overrides explicit True). | |
| schedule_ids | No | Filter by schedules (optional). Allowed with default context. | |
| current_user_context | No | Use escalation policies the current user is a target of (default: True); errors if the current user is a target of no escalation policy and no schedule_ids are given. Ignored when `user_ids` or `escalation_policy_ids` are provided (those imply False, even if this is explicitly True). | |
| escalation_policy_ids | No | Filter by policies (optional). Providing this parameter implies `current_user_context=False` (overrides explicit True). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||