Skip to main content
Glama
PagerDuty MCP Server

PagerDuty MCP Server

by wpfleger96

get_services

Retrieve PagerDuty services by name, team, or service ID to inspect service details and filter results for incident and ownership workflows.

Instructions

Get PagerDuty services by filters or get details for a specific service ID.

Call patterns:

  • Search by name: query="Service Name" with the default context (omit current_user_context; limited to your teams).

  • By team: pass team_ids (implies current_user_context=False, including overriding an explicit True).

  • Do not set current_user_context=False with only query; that errors because team_ids are required in False mode.

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_services"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoLimit the number of results (optional). Not used if `service_id` is provided.
queryNoFilter services whose names contain the search query (optional). Works with default `current_user_context=True` (limited to your teams). Not a substitute for `team_ids` when context is False. Not used if `service_id` is provided.
includeNoList of fields to include in the response. If specified, only these fields will be returned for each service
team_idsNoFilter results to only services assigned to teams with the given IDs (optional). Providing this parameter implies `current_user_context=False` (overrides explicit True). Not used if `service_id` is provided.
service_idNoThe service ID to retrieve (optional, cannot be used with any other filters).
current_user_contextNoUse current user's team IDs to filter (default: True); errors if the current user belongs to no teams. Ignored when `team_ids` are provided (those imply False, even if this is explicitly True). Not used if `service_id` is provided.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv4.1.1
    • changedInput schema / properties / current_user_context / description
      Previous value: -"Use current user's team IDs to filter (default: True); errors if the current user belongs to no teams. Not used if `service_id` is provided."New value: +"Use current user's team IDs to filter (default: True); errors if the current user belongs to no teams. Ignored when `team_ids` are provided (those imply False, even if this is explicitly True). Not used if `service_id` is provided."
    • changedInput schema / properties / query / description
      Previous value: -"Filter services whose names contain the search query (optional). Not used if `service_id` is provided."New value: +"Filter services whose names contain the search query (optional). Works with default `current_user_context=True` (limited to your teams). Not a substitute for `team_ids` when context is False. Not used if `service_id` is provided."
    • changedInput schema / properties / team_ids / description
      Previous value: -"Filter results to only services assigned to teams with the given IDs (optional, cannot be used with current_user_context). Not used if `service_id` is provided."New value: +"Filter results to only services assigned to teams with the given IDs (optional). Providing this parameter implies `current_user_context=False` (overrides explicit True). Not used if `service_id` is provided."
  2. Changed1 schema field changedv4.0.7
    • changedInput schema / properties / current_user_context / description
      Previous value: -"Use current user's team IDs to filter (default: True). Not used if `service_id` is provided."New value: +"Use current user's team IDs to filter (default: True); errors if the current user belongs to no teams. Not used if `service_id` is provided."
  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 service"
      +}
  4. Changed12 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 IDs to filter (default: True). Not used if `service_id` is provided."
    • removedInput schema / properties / current_user_context / title
      Removed value: -"Current User Context"
    • addedInput schema / properties / limit / description
      Added value: +"Limit the number of results (optional). Not used if `service_id` is provided."
    • removedInput schema / properties / limit / title
      Removed value: -"Limit"
    • addedInput schema / properties / query / description
      Added value: +"Filter services whose names contain the search query (optional). Not used if `service_id` is provided."
    • removedInput schema / properties / query / title
      Removed value: -"Query"
    • addedInput schema / properties / service_id / description
      Added value: +"The service ID to retrieve (optional, cannot be used with any other filters)."
    • removedInput schema / properties / service_id / title
      Removed value: -"Service Id"
    • addedInput schema / properties / team_ids / description
      Added value: +"Filter results to only services assigned to teams with the given IDs (optional, cannot be used with current_user_context). Not used if `service_id` is provided."
    • removedInput schema / properties / team_ids / title
      Removed value: -"Team Ids"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "type": "object"
      +}
  5. First observedv1.0.0

TDQS

A4.7/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden, and it delivers the important side effects: `team_ids` silently implies `current_user_context=False` even when True was explicitly passed, default context is restricted to the caller's teams, and `current_user_context` errors when the user belongs to no teams. What it omits is the return shape and pagination behavior, though a separate output schema partially covers return values.

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?

One-sentence purpose statement followed by a three-bullet pattern list; the highest-risk fact (the error case) is last but each bullet earns its place. No filler or restatement of the tool name.

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

Completeness5/5

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

For a six-parameter, all-optional tool with 100% schema coverage and an output schema, the remaining need is disambiguation of modes and error conditions, and the description covers both. An agent can pick the correct call shape without opening 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 100%, so the baseline is 3, but the description adds value by consolidating cross-parameter interactions in one place — the `team_ids`→`current_user_context` override and the mutual exclusivity of `service_id` with all filters — rather than requiring the agent to reconcile six individual schema notes. It stops short of explaining how `query` and `team_ids` interact when both are supplied.

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

Purpose5/5

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

The description opens with a specific verb and resource ('Get PagerDuty services') and immediately distinguishes its two modes: filtered listing versus detail retrieval by 'service ID'. Because the sibling tools cover different resources (incidents, teams, users, schedules), the resource name alone separates this tool from them without needing an explicit cross-reference.

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?

A dedicated 'Call patterns' section states exactly when to use each mode: default context for name search, `team_ids` for team-scoped listing, and `service_id` for detail lookup. It also names a concrete invalid combination to avoid ('Do not set `current_user_context=False` with only `query`; that errors'), which is explicit when-not guidance rather than implied usage.

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