Skip to content

Commit 6096883

Browse files
jottakkaFrancisco Liberal
andauthored
Pagerduty documentation (#600)
* Pagerduty documentation * merge * update docs --------- Co-authored-by: Francisco Liberal <[email protected]>
1 parent 66601fc commit 6096883

31 files changed

+1299
-23
lines changed

app/en/home/auth-providers/pagerduty/page.mdx

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ import { Tabs, Callout, Steps } from "nextra/components";
44

55
The PagerDuty auth provider enables tools and agents to call [PagerDuty APIs](https://developer.pagerduty.com/api-reference/) on behalf of a user using OAuth 2.0 authentication.
66

7+
<Callout type="warning">
8+
Arcade currently supports **Classic** PagerDuty OAuth apps only. Choose Classic and select either **read-only** or **read/write** access. Newer Web App or other models are not supported. See [PagerDuty OAuth functionality](https://developer.pagerduty.com/docs/oauth-functionality).
9+
</Callout>
10+
711
<Callout>
812
Want to quickly get started with PagerDuty in your agent or AI app? The
913
pre-built [Arcade PagerDuty MCP
@@ -56,10 +60,10 @@ To integrate with PagerDuty's API using OAuth 2.0, you'll need to register an ap
5660

5761
#### Configure OAuth settings
5862

59-
1. Choose **Scoped OAuth** as the authorization method
60-
2. Select the required **permission scopes** based on your application's needs:
61-
- Common scopes include: `read`, `write`, `analytics.read`, `users.read`, `teams.read`, etc.
62-
3. Add the **Redirect URL** generated by Arcade (see configuration section below) to your app's redirect URLs
63+
1. Choose **Classic** OAuth and select the permission level:
64+
- **Read-only** (recommended; all current MCP tools only read data)
65+
- Or **Read/Write** if you plan custom tools that modify data
66+
2. Add the **Redirect URL** generated by Arcade (see configuration section below) to your app's redirect URLs
6367

6468
#### Save your credentials
6569

@@ -68,7 +72,7 @@ To integrate with PagerDuty's API using OAuth 2.0, you'll need to register an ap
6872

6973
</Steps>
7074

71-
For detailed instructions, refer to PagerDuty's [OAuth 2.0 guide](https://www.pagerduty.com/blog/insights/build-sophisticated-apps-for-your-pagerduty-environment-using-oauth-2-0-and-api-scopes/) and [OAuth documentation](https://developer.pagerduty.com/docs/ZG9jOjExMDI5NTgx-o-auth-2-functionality).
75+
For detailed instructions, refer to PagerDuty's [OAuth 2.0 guide](https://www.pagerduty.com/blog/insights/build-sophisticated-apps-for-your-pagerduty-environment-using-oauth-2-0-and-api-scopes/) and [OAuth documentation](https://developer.pagerduty.com/docs/oauth-functionality).
7276

7377
Next, add the PagerDuty app to Arcade.
7478

@@ -143,7 +147,7 @@ Edit the `engine.yaml` file and add a new item to the `auth.providers` section:
143147
```yaml
144148
auth:
145149
providers:
146-
- id: arcade-pagerduty
150+
- id: pagerduty
147151
description: PagerDuty OAuth 2.0 provider
148152
enabled: true
149153
type: oauth2
@@ -195,8 +199,8 @@ user_id = "{arcade_user_id}"
195199
# Start the authorization process
196200
auth_response = client.auth.start(
197201
user_id=user_id,
198-
provider="arcade-pagerduty",
199-
scopes=["read", "write"]
202+
provider="pagerduty",
203+
scopes=[]
200204
)
201205

202206
if auth_response.status != "completed":
@@ -222,10 +226,7 @@ const client = new Arcade();
222226
const userId = "{arcade_user_id}";
223227

224228
// Start the authorization process
225-
const authResponse = await client.auth.start(userId, "arcade-pagerduty", [
226-
"read",
227-
"write",
228-
]);
229+
const authResponse = await client.auth.start(userId, "pagerduty", []);
229230

230231
if (authResponse.status !== "completed") {
231232
console.log("Please complete the authorization challenge in your browser:");
@@ -249,21 +250,18 @@ You can use the pre-built [Arcade PagerDuty MCP Server](/mcp-servers/development
249250

250251
If the pre-built tools in the PagerDuty MCP Server don't meet your needs, you can author your own [custom tools](/home/build-tools/create-a-mcp-server) that interact with the PagerDuty API.
251252

252-
Use the `OAuth2()` auth class to specify that a tool requires authorization with PagerDuty. The `context.authorization.token` field will be automatically populated with the user's PagerDuty token:
253+
Use the `PagerDuty()` auth class to specify that a tool requires authorization with PagerDuty. The `context.authorization.token` field will be automatically populated with the user's PagerDuty token:
253254

254255
```python {8-12,22}
255256
from typing import Annotated
256257

257258
import httpx
258259
from arcade_tdk import ToolContext, tool
259-
from arcade_tdk.auth import OAuth2
260+
from arcade_tdk.auth import PagerDuty
260261

261262

262263
@tool(
263-
requires_auth=OAuth2(
264-
provider_id="arcade-pagerduty",
265-
scopes=["read"]
266-
)
264+
requires_auth=PagerDuty()
267265
)
268266
async def get_current_user(
269267
context: ToolContext,
@@ -283,11 +281,11 @@ async def get_current_user(
283281
return dict(response.json())
284282
```
285283

286-
## Available Scopes
284+
## Permissions
287285

288-
PagerDuty uses a simplified scope system with the following scopes:
286+
PagerDuty Classic apps use two permission levels:
289287

290-
- `read` - Read-only access to PagerDuty resources
291-
- `write` - Full read and write access to PagerDuty resources
288+
- **read** Read-only access to PagerDuty resources (recommended; all current MCP tools are read-only)
289+
- **write** Full read/write access (only needed if you add custom write tools)
292290

293-
For more details about PagerDuty's OAuth scopes and permissions, refer to the [PagerDuty OAuth Scopes documentation](https://developer.pagerduty.com/docs/ZG9jOjExMDI5NTgx-o-auth-2-functionality#scopes).
291+
For more details about PagerDutys OAuth permissions, refer to the [PagerDuty OAuth functionality docs](https://developer.pagerduty.com/docs/oauth-functionality#scopes).

app/en/mcp-servers/customer-support/_meta.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ const meta: MetaRecord = {
1414
pylon: {
1515
title: "Pylon",
1616
},
17+
pagerduty: {
18+
title: "PagerDuty",
19+
},
1720
};
1821

1922
export default meta;

0 commit comments

Comments
 (0)