Skip to content

Commit 0c7d61a

Browse files
waleedlatif1claude
andcommitted
fix(rootly): align tools with OpenAPI spec
- list_incident_types: use filter[name] instead of unsupported filter[search] - list_severities: add missing search param (filter[search]) - create_incident: title is optional per API (auto-generated if null) - update_incident: add kind, private, labels, incidentTypeIds, functionalityIds, cancellationMessage params - create/update/list incidents: add scheduled, in_progress, completed status values - create_alert: fix status description (only open/triggered on create) - add_incident_event: add updatedAt to response - block: add matching subBlocks and params for all new tool fields Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 4745f44 commit 0c7d61a

10 files changed

Lines changed: 213 additions & 30 deletions

File tree

apps/docs/content/docs/en/tools/rootly.mdx

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ Create a new incident in Rootly with optional severity, services, and teams.
5353
| Parameter | Type | Required | Description |
5454
| --------- | ---- | -------- | ----------- |
5555
| `apiKey` | string | Yes | Rootly API key |
56-
| `title` | string | Yes | The title of the incident |
56+
| `title` | string | No | The title of the incident \(auto-generated if not provided\) |
5757
| `summary` | string | No | A summary of the incident |
5858
| `severityId` | string | No | Severity ID to attach to the incident |
59-
| `status` | string | No | Incident status \(in_triage, started, detected, acknowledged, mitigated, resolved, closed, cancelled\) |
60-
| `kind` | string | No | Incident kind \(normal, test, example, backfilled, scheduled\) |
59+
| `status` | string | No | Incident status \(in_triage, started, detected, acknowledged, mitigated, resolved, closed, cancelled, scheduled, in_progress, completed\) |
60+
| `kind` | string | No | Incident kind \(normal, normal_sub, test, test_sub, example, example_sub, backfilled, scheduled, scheduled_sub\) |
6161
| `serviceIds` | string | No | Comma-separated service IDs to attach |
6262
| `environmentIds` | string | No | Comma-separated environment IDs to attach |
6363
| `groupIds` | string | No | Comma-separated team/group IDs to attach |
@@ -138,12 +138,18 @@ Update an existing incident in Rootly (status, severity, summary, etc.).
138138
| `title` | string | No | Updated incident title |
139139
| `summary` | string | No | Updated incident summary |
140140
| `severityId` | string | No | Updated severity ID |
141-
| `status` | string | No | Updated status \(in_triage, started, detected, acknowledged, mitigated, resolved, closed, cancelled\) |
141+
| `status` | string | No | Updated status \(in_triage, started, detected, acknowledged, mitigated, resolved, closed, cancelled, scheduled, in_progress, completed\) |
142+
| `kind` | string | No | Incident kind \(normal, normal_sub, test, test_sub, example, example_sub, backfilled, scheduled, scheduled_sub\) |
143+
| `private` | boolean | No | Set incident as private \(cannot be undone\) |
142144
| `serviceIds` | string | No | Comma-separated service IDs |
143145
| `environmentIds` | string | No | Comma-separated environment IDs |
144146
| `groupIds` | string | No | Comma-separated team/group IDs |
147+
| `incidentTypeIds` | string | No | Comma-separated incident type IDs to attach |
148+
| `functionalityIds` | string | No | Comma-separated functionality IDs to attach |
149+
| `labels` | string | No | Labels as JSON object, e.g. \{"platform":"osx","version":"1.29"\} |
145150
| `mitigationMessage` | string | No | How was the incident mitigated? |
146151
| `resolutionMessage` | string | No | How was the incident resolved? |
152+
| `cancellationMessage` | string | No | Why was the incident cancelled? |
147153

148154
#### Output
149155

@@ -178,7 +184,7 @@ List incidents from Rootly with optional filtering by status, severity, and more
178184
| Parameter | Type | Required | Description |
179185
| --------- | ---- | -------- | ----------- |
180186
| `apiKey` | string | Yes | Rootly API key |
181-
| `status` | string | No | Filter by status \(in_triage, started, detected, acknowledged, mitigated, resolved, closed, cancelled\) |
187+
| `status` | string | No | Filter by status \(in_triage, started, detected, acknowledged, mitigated, resolved, closed, cancelled, scheduled, in_progress, completed\) |
182188
| `severity` | string | No | Filter by severity slug |
183189
| `search` | string | No | Search term to filter incidents |
184190
| `services` | string | No | Filter by service slugs \(comma-separated\) |
@@ -224,8 +230,8 @@ Create a new alert in Rootly for on-call notification and routing.
224230
| `apiKey` | string | Yes | Rootly API key |
225231
| `summary` | string | Yes | The summary of the alert |
226232
| `description` | string | No | A detailed description of the alert |
227-
| `source` | string | No | The source of the alert \(e.g., api, manual, datadog, pagerduty\) |
228-
| `status` | string | No | Alert status \(open, triggered, acknowledged, resolved\) |
233+
| `source` | string | Yes | The source of the alert \(e.g., api, manual, datadog, pagerduty\) |
234+
| `status` | string | No | Alert status on creation \(open, triggered\) |
229235
| `serviceIds` | string | No | Comma-separated service IDs to attach |
230236
| `groupIds` | string | No | Comma-separated team/group IDs to attach |
231237
| `environmentIds` | string | No | Comma-separated environment IDs to attach |
@@ -305,6 +311,7 @@ Add a timeline event to an existing incident in Rootly.
305311
| `visibility` | string | Event visibility \(internal or external\) |
306312
| `occurredAt` | string | When the event occurred |
307313
| `createdAt` | string | Creation date |
314+
| `updatedAt` | string | Last update date |
308315

309316
### `rootly_list_services`
310317

@@ -342,6 +349,7 @@ List severity levels configured in Rootly.
342349
| Parameter | Type | Required | Description |
343350
| --------- | ---- | -------- | ----------- |
344351
| `apiKey` | string | Yes | Rootly API key |
352+
| `search` | string | No | Search term to filter severities |
345353
| `pageSize` | number | No | Number of items per page \(default: 20\) |
346354
| `pageNumber` | number | No | Page number for pagination |
347355

@@ -424,7 +432,7 @@ List incident types configured in Rootly.
424432
| Parameter | Type | Required | Description |
425433
| --------- | ---- | -------- | ----------- |
426434
| `apiKey` | string | Yes | Rootly API key |
427-
| `search` | string | No | Search term to filter incident types |
435+
| `search` | string | No | Filter incident types by name |
428436
| `pageSize` | number | No | Number of items per page \(default: 20\) |
429437
| `pageNumber` | number | No | Page number for pagination |
430438

apps/sim/blocks/blocks/rootly.ts

Lines changed: 103 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ export const RootlyBlock: BlockConfig<RootlyResponse> = {
4747
type: 'short-input',
4848
placeholder: 'Incident title',
4949
condition: { field: 'operation', value: 'rootly_create_incident' },
50-
required: { field: 'operation', value: 'rootly_create_incident' },
5150
},
5251
{
5352
id: 'createSummary',
@@ -78,6 +77,9 @@ export const RootlyBlock: BlockConfig<RootlyResponse> = {
7877
{ label: 'Resolved', id: 'resolved' },
7978
{ label: 'Closed', id: 'closed' },
8079
{ label: 'Cancelled', id: 'cancelled' },
80+
{ label: 'Scheduled', id: 'scheduled' },
81+
{ label: 'In Progress', id: 'in_progress' },
82+
{ label: 'Completed', id: 'completed' },
8183
],
8284
value: () => '',
8385
condition: { field: 'operation', value: 'rootly_create_incident' },
@@ -215,6 +217,9 @@ export const RootlyBlock: BlockConfig<RootlyResponse> = {
215217
{ label: 'Resolved', id: 'resolved' },
216218
{ label: 'Closed', id: 'closed' },
217219
{ label: 'Cancelled', id: 'cancelled' },
220+
{ label: 'Scheduled', id: 'scheduled' },
221+
{ label: 'In Progress', id: 'in_progress' },
222+
{ label: 'Completed', id: 'completed' },
218223
],
219224
condition: { field: 'operation', value: 'rootly_update_incident' },
220225
},
@@ -266,6 +271,74 @@ export const RootlyBlock: BlockConfig<RootlyResponse> = {
266271
condition: { field: 'operation', value: 'rootly_update_incident' },
267272
mode: 'advanced',
268273
},
274+
{
275+
id: 'updateKind',
276+
title: 'Kind',
277+
type: 'dropdown',
278+
options: [
279+
{ label: 'Unchanged', id: '' },
280+
{ label: 'Normal', id: 'normal' },
281+
{ label: 'Test', id: 'test' },
282+
{ label: 'Example', id: 'example' },
283+
{ label: 'Backfilled', id: 'backfilled' },
284+
{ label: 'Scheduled', id: 'scheduled' },
285+
],
286+
value: () => '',
287+
condition: { field: 'operation', value: 'rootly_update_incident' },
288+
mode: 'advanced',
289+
},
290+
{
291+
id: 'updatePrivate',
292+
title: 'Private',
293+
type: 'dropdown',
294+
options: [
295+
{ label: 'Unchanged', id: '' },
296+
{ label: 'Yes', id: 'true' },
297+
{ label: 'No', id: 'false' },
298+
],
299+
value: () => '',
300+
condition: { field: 'operation', value: 'rootly_update_incident' },
301+
mode: 'advanced',
302+
},
303+
{
304+
id: 'updateIncidentTypeIds',
305+
title: 'Incident Type IDs',
306+
type: 'short-input',
307+
placeholder: 'Comma-separated incident type IDs',
308+
condition: { field: 'operation', value: 'rootly_update_incident' },
309+
mode: 'advanced',
310+
},
311+
{
312+
id: 'updateFunctionalityIds',
313+
title: 'Functionality IDs',
314+
type: 'short-input',
315+
placeholder: 'Comma-separated functionality IDs',
316+
condition: { field: 'operation', value: 'rootly_update_incident' },
317+
mode: 'advanced',
318+
},
319+
{
320+
id: 'updateLabels',
321+
title: 'Labels',
322+
type: 'short-input',
323+
placeholder: '{"platform":"osx","version":"1.29"}',
324+
condition: { field: 'operation', value: 'rootly_update_incident' },
325+
mode: 'advanced',
326+
wandConfig: {
327+
enabled: true,
328+
prompt:
329+
'Generate a JSON object of key-value label pairs for a Rootly incident. Example: {"platform":"osx","version":"1.29","region":"us-east-1"}. Return ONLY the JSON object - no explanations, no extra text.',
330+
placeholder: 'Describe the labels (e.g., "platform osx, version 1.29")...',
331+
generationType: 'json-object',
332+
},
333+
},
334+
{
335+
id: 'cancellationMessage',
336+
title: 'Cancellation Message',
337+
type: 'long-input',
338+
placeholder: 'Why was the incident cancelled?',
339+
condition: { field: 'operation', value: 'rootly_update_incident' },
340+
mode: 'advanced',
341+
},
269342

270343
// List Incidents fields
271344
{
@@ -282,6 +355,9 @@ export const RootlyBlock: BlockConfig<RootlyResponse> = {
282355
{ label: 'Resolved', id: 'resolved' },
283356
{ label: 'Closed', id: 'closed' },
284357
{ label: 'Cancelled', id: 'cancelled' },
358+
{ label: 'Scheduled', id: 'scheduled' },
359+
{ label: 'In Progress', id: 'in_progress' },
360+
{ label: 'Completed', id: 'completed' },
285361
],
286362
condition: { field: 'operation', value: 'rootly_list_incidents' },
287363
},
@@ -378,7 +454,7 @@ export const RootlyBlock: BlockConfig<RootlyResponse> = {
378454
type: 'short-input',
379455
placeholder: 'Alert source (e.g., api, datadog)',
380456
condition: { field: 'operation', value: 'rootly_create_alert' },
381-
mode: 'advanced',
457+
required: { field: 'operation', value: 'rootly_create_alert' },
382458
},
383459
{
384460
id: 'alertServiceIds',
@@ -420,8 +496,6 @@ export const RootlyBlock: BlockConfig<RootlyResponse> = {
420496
{ label: 'Default', id: '' },
421497
{ label: 'Open', id: 'open' },
422498
{ label: 'Triggered', id: 'triggered' },
423-
{ label: 'Acknowledged', id: 'acknowledged' },
424-
{ label: 'Resolved', id: 'resolved' },
425499
],
426500
value: () => '',
427501
condition: { field: 'operation', value: 'rootly_create_alert' },
@@ -455,6 +529,7 @@ export const RootlyBlock: BlockConfig<RootlyResponse> = {
455529
{ label: 'Triggered', id: 'triggered' },
456530
{ label: 'Acknowledged', id: 'acknowledged' },
457531
{ label: 'Resolved', id: 'resolved' },
532+
{ label: 'Deferred', id: 'deferred' },
458533
],
459534
condition: { field: 'operation', value: 'rootly_list_alerts' },
460535
},
@@ -564,6 +639,13 @@ export const RootlyBlock: BlockConfig<RootlyResponse> = {
564639
},
565640

566641
// List Severities fields
642+
{
643+
id: 'severitiesSearch',
644+
title: 'Search',
645+
type: 'short-input',
646+
placeholder: 'Search severities...',
647+
condition: { field: 'operation', value: 'rootly_list_severities' },
648+
},
567649
{
568650
id: 'severitiesPageSize',
569651
title: 'Page Size',
@@ -634,9 +716,9 @@ export const RootlyBlock: BlockConfig<RootlyResponse> = {
634716
// List Incident Types fields
635717
{
636718
id: 'incidentTypesSearch',
637-
title: 'Search',
719+
title: 'Name Filter',
638720
type: 'short-input',
639-
placeholder: 'Search incident types...',
721+
placeholder: 'Filter by name...',
640722
condition: { field: 'operation', value: 'rootly_list_incident_types' },
641723
},
642724
{
@@ -783,11 +865,17 @@ export const RootlyBlock: BlockConfig<RootlyResponse> = {
783865
summary: params.updateSummary,
784866
status: params.updateStatus,
785867
severityId: params.updateSeverityId,
868+
kind: params.updateKind,
869+
private: params.updatePrivate ? params.updatePrivate === 'true' : undefined,
786870
mitigationMessage: params.mitigationMessage,
787871
resolutionMessage: params.resolutionMessage,
872+
cancellationMessage: params.cancellationMessage,
788873
serviceIds: params.updateServiceIds,
789874
environmentIds: params.updateEnvironmentIds,
790875
groupIds: params.updateGroupIds,
876+
incidentTypeIds: params.updateIncidentTypeIds,
877+
functionalityIds: params.updateFunctionalityIds,
878+
labels: params.updateLabels,
791879
}
792880

793881
case 'rootly_list_incidents':
@@ -856,6 +944,7 @@ export const RootlyBlock: BlockConfig<RootlyResponse> = {
856944
case 'rootly_list_severities':
857945
return {
858946
...baseParams,
947+
search: params.severitiesSearch,
859948
pageSize: params.severitiesPageSize ? Number(params.severitiesPageSize) : undefined,
860949
pageNumber: params.severitiesPageNumber
861950
? Number(params.severitiesPageNumber)
@@ -951,6 +1040,12 @@ export const RootlyBlock: BlockConfig<RootlyResponse> = {
9511040
updateServiceIds: { type: 'string', description: 'Updated service IDs' },
9521041
updateEnvironmentIds: { type: 'string', description: 'Updated environment IDs' },
9531042
updateGroupIds: { type: 'string', description: 'Updated team IDs' },
1043+
updateKind: { type: 'string', description: 'Updated kind' },
1044+
updatePrivate: { type: 'string', description: 'Whether incident is private' },
1045+
updateIncidentTypeIds: { type: 'string', description: 'Updated incident type IDs' },
1046+
updateFunctionalityIds: { type: 'string', description: 'Updated functionality IDs' },
1047+
updateLabels: { type: 'string', description: 'Updated labels as JSON' },
1048+
cancellationMessage: { type: 'string', description: 'Cancellation message' },
9541049
listIncidentsStatus: { type: 'string', description: 'Filter by status' },
9551050
listIncidentsSearch: { type: 'string', description: 'Search incidents' },
9561051
listIncidentsSeverity: { type: 'string', description: 'Filter by severity' },
@@ -983,6 +1078,7 @@ export const RootlyBlock: BlockConfig<RootlyResponse> = {
9831078
servicesSearch: { type: 'string', description: 'Search services' },
9841079
servicesPageSize: { type: 'string', description: 'Services page size' },
9851080
servicesPageNumber: { type: 'string', description: 'Services page number' },
1081+
severitiesSearch: { type: 'string', description: 'Search severities' },
9861082
severitiesPageSize: { type: 'string', description: 'Severities page size' },
9871083
severitiesPageNumber: { type: 'string', description: 'Severities page number' },
9881084
teamsSearch: { type: 'string', description: 'Search teams' },
@@ -1024,6 +1120,7 @@ export const RootlyBlock: BlockConfig<RootlyResponse> = {
10241120
visibility: { type: 'string', description: 'Event visibility' },
10251121
occurredAt: { type: 'string', description: 'When the event occurred' },
10261122
createdAt: { type: 'string', description: 'Creation date' },
1123+
updatedAt: { type: 'string', description: 'Last update date' },
10271124
services: {
10281125
type: 'json',
10291126
description: 'List of services (id, name, slug, description, color)',

apps/sim/tools/rootly/add_incident_event.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ export const rootlyAddIncidentEventTool: ToolConfig<
6767
visibility: null,
6868
occurredAt: null,
6969
createdAt: '',
70+
updatedAt: '',
7071
},
7172
error: errorData.errors?.[0]?.detail || `HTTP ${response.status}: ${response.statusText}`,
7273
}
@@ -82,6 +83,7 @@ export const rootlyAddIncidentEventTool: ToolConfig<
8283
visibility: attrs.visibility ?? null,
8384
occurredAt: attrs.occurred_at ?? null,
8485
createdAt: attrs.created_at ?? '',
86+
updatedAt: attrs.updated_at ?? '',
8587
},
8688
}
8789
},
@@ -107,5 +109,9 @@ export const rootlyAddIncidentEventTool: ToolConfig<
107109
type: 'string',
108110
description: 'Creation date',
109111
},
112+
updatedAt: {
113+
type: 'string',
114+
description: 'Last update date',
115+
},
110116
},
111117
}

apps/sim/tools/rootly/create_alert.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ export const rootlyCreateAlertTool: ToolConfig<RootlyCreateAlertParams, RootlyCr
2929
},
3030
source: {
3131
type: 'string',
32-
required: false,
32+
required: true,
3333
visibility: 'user-or-llm',
3434
description: 'The source of the alert (e.g., api, manual, datadog, pagerduty)',
3535
},
3636
status: {
3737
type: 'string',
3838
required: false,
3939
visibility: 'user-or-llm',
40-
description: 'Alert status (open, triggered, acknowledged, resolved)',
40+
description: 'Alert status on creation (open, triggered)',
4141
},
4242
serviceIds: {
4343
type: 'string',
@@ -87,9 +87,9 @@ export const rootlyCreateAlertTool: ToolConfig<RootlyCreateAlertParams, RootlyCr
8787
body: (params) => {
8888
const attributes: Record<string, unknown> = {
8989
summary: params.summary,
90+
source: params.source,
9091
}
9192
if (params.description) attributes.description = params.description
92-
if (params.source) attributes.source = params.source
9393
if (params.status) attributes.status = params.status
9494
if (params.externalId) attributes.external_id = params.externalId
9595
if (params.externalUrl) attributes.external_url = params.externalUrl

apps/sim/tools/rootly/create_incident.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ export const rootlyCreateIncidentTool: ToolConfig<
1919
},
2020
title: {
2121
type: 'string',
22-
required: true,
22+
required: false,
2323
visibility: 'user-or-llm',
24-
description: 'The title of the incident',
24+
description: 'The title of the incident (auto-generated if not provided)',
2525
},
2626
summary: {
2727
type: 'string',
@@ -40,13 +40,14 @@ export const rootlyCreateIncidentTool: ToolConfig<
4040
required: false,
4141
visibility: 'user-or-llm',
4242
description:
43-
'Incident status (in_triage, started, detected, acknowledged, mitigated, resolved, closed, cancelled)',
43+
'Incident status (in_triage, started, detected, acknowledged, mitigated, resolved, closed, cancelled, scheduled, in_progress, completed)',
4444
},
4545
kind: {
4646
type: 'string',
4747
required: false,
4848
visibility: 'user-or-llm',
49-
description: 'Incident kind (normal, test, example, backfilled, scheduled)',
49+
description:
50+
'Incident kind (normal, normal_sub, test, test_sub, example, example_sub, backfilled, scheduled, scheduled_sub)',
5051
},
5152
serviceIds: {
5253
type: 'string',
@@ -100,9 +101,8 @@ export const rootlyCreateIncidentTool: ToolConfig<
100101
Authorization: `Bearer ${params.apiKey}`,
101102
}),
102103
body: (params) => {
103-
const attributes: Record<string, unknown> = {
104-
title: params.title,
105-
}
104+
const attributes: Record<string, unknown> = {}
105+
if (params.title) attributes.title = params.title
106106
if (params.summary) attributes.summary = params.summary
107107
if (params.severityId) attributes.severity_id = params.severityId
108108
if (params.status) attributes.status = params.status

0 commit comments

Comments
 (0)