Skip to main content
Glama
PagerDuty MCP Server

PagerDuty MCP Server

by wpfleger96

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_ids may be used with the default context (intersection) or with current_user_context=False.

  • By user/policy IDs: pass user_ids and/or escalation_policy_ids (implies current_user_context=False, including overriding an explicit True).

Behavior varies by time parameters:

  1. Without since/until: Returns current on-calls Example: get_oncalls(current_user_context=False, schedule_ids=["PSCHED123"])

  2. 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

NameRequiredDescriptionDefault
limitNoMax results (optional)
sinceNoStart of query range in ISO8601 format (default: current datetime)
untilNoEnd of query range in ISO8601 format (default: current datetime, max range: 90 days in the future). Cannot be before `since`.
includeNoList of fields to include in the response. If specified, only these fields will be returned for each on-call entry
earliestNoOnly earliest on-call per policy/level/user combo (optional)
user_idsNoFilter by users (optional). Providing this parameter implies `current_user_context=False` (overrides explicit True).
schedule_idsNoFilter by schedules (optional). Allowed with default context.
current_user_contextNoUse 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_idsNoFilter by policies (optional). Providing this parameter implies `current_user_context=False` (overrides explicit True).

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv4.1.1
    • changedInput schema / properties / current_user_context / description
      Previous value: -"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."New value: +"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)."
    • changedInput schema / properties / escalation_policy_ids / description
      Previous value: -"Filter by policies (optional, excludes current_user_context)"New value: +"Filter by policies (optional). Providing this parameter implies `current_user_context=False` (overrides explicit True)."
    • changedInput schema / properties / schedule_ids / description
      Previous value: -"Filter by schedules (optional)"New value: +"Filter by schedules (optional). Allowed with default context."
    • changedInput schema / properties / user_ids / description
      Previous value: -"Filter by users (optional, excludes current_user_context)"New value: +"Filter by users (optional). Providing this parameter implies `current_user_context=False` (overrides explicit True)."
  2. Changed2 schema fields changedv4.0.7
    • changedInput schema / properties / current_user_context / description
      Previous value: -"Use current user's team policies (default: True)"New value: +"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."
    • changedInput schema / properties / escalation_policy_ids / description
      Previous value: -"Filter by policies (optional)"New value: +"Filter by policies (optional, excludes current_user_context)"
  3. Changed1 schema field changedv4.0.1
    • addedInput schema / properties / include
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "List of fields to include in the response. If specified, only these fields will be returned for each on-call entry"
      +}
  4. Changed18 schema fields changedv3.1.4
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / current_user_context / description
      Added value: +"Use current user's team policies (default: True)"
    • removedInput schema / properties / current_user_context / title
      Removed value: -"Current User Context"
    • addedInput schema / properties / earliest / description
      Added value: +"Only earliest on-call per policy/level/user combo (optional)"
    • removedInput schema / properties / earliest / title
      Removed value: -"Earliest"
    • addedInput schema / properties / escalation_policy_ids / description
      Added value: +"Filter by policies (optional)"
    • removedInput schema / properties / escalation_policy_ids / title
      Removed value: -"Escalation Policy Ids"
    • addedInput schema / properties / limit / description
      Added value: +"Max results (optional)"
    • removedInput schema / properties / limit / title
      Removed value: -"Limit"
    • addedInput schema / properties / schedule_ids / description
      Added value: +"Filter by schedules (optional)"
    • removedInput schema / properties / schedule_ids / title
      Removed value: -"Schedule Ids"
    • addedInput schema / properties / since / description
      Added value: +"Start of query range in ISO8601 format (default: current datetime)"
    • removedInput schema / properties / since / title
      Removed value: -"Since"
    • addedInput schema / properties / until / description
      Added value: +"End of query range in ISO8601 format (default: current datetime, max range: 90 days in the future). Cannot be before `since`."
    • removedInput schema / properties / until / title
      Removed value: -"Until"
    • addedInput schema / properties / user_ids / description
      Added value: +"Filter by users (optional, excludes current_user_context)"
    • removedInput schema / properties / user_ids / title
      Removed value: -"User Ids"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "type": "object"
      +}
  5. First observedv1.0.0

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the behavioral burden and does a good job disclosing the key context rules: default current-user context, the error condition when no escalation policy applies, and when user_ids or escalation_policy_ids override current_user_context. It does not cover auth, rate limits, or pagination behavior beyond what the schema already states.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with purpose and then organizes the rest into call patterns and time-parameter behavior. The examples are directly relevant and the structure makes the parameter interactions easy to scan.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a nine-parameter query tool with an output schema and full schema description coverage, the description covers the main behavioral pitfalls and time-range semantics well. It leaves minor gaps around limit/include/earliest behavior, but those are documented in the schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is already 100%, so the baseline is 3. The description adds useful synthesis beyond the schema by grouping parameters into call patterns and explaining the interaction between schedule_ids, user_ids, escalation_policy_ids, current_user_context, and time range parameters, though it does not cover all nine parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: list on-call entries, scoped to schedules, policies, or time ranges. It is clear what the tool returns, but it does not explicitly differentiate itself from similarly named siblings such as list_users_oncall.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives explicit call patterns for the default context, schedule-filtered calls, user/policy-filtered calls, and time-bounded calls. It also explains when filters override current_user_context and provides concrete examples for with/without since/until usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.