Skip to content

Commit c183275

Browse files
committed
fix(incidentio): align declared tool outputs and enum hints with the v2 API
Four declared outputs could never be populated because the v2 API names the field differently, and three param descriptions advertised enum values the API rejects. Verified against https://api.incident.io/v1/openapiV3.json, which serves the v1/v2/v3 schemas in one document. - IncidentV2 has `permalink`, not `incident_url`, and no `description` at all: incidents list/create/update/show now declare and map `permalink` and drop `description`. - IncidentUpdateV2 has `new_incident_status` (required), not an optional `new_status`; `message` is optional, `updated_at` is not returned, and `updater` is an actor wrapper whose user lives under `updater.user`. - EscalationV2 has `title` and `status`, not `name`. - WorkflowsCreate/UpdateWorkflowPayloadV2 accept only `newly_created` and `newly_created_and_active` for `runs_on_incidents`, and CustomFieldsCreatePayloadV2 accepts only text, link, numeric, single_select and multi_select for `field_type`. Renaming a declared output changes the reference-picker surface for these tools; nothing in the repo read the old names.
1 parent b19553e commit c183275

16 files changed

Lines changed: 368 additions & 97 deletions

apps/docs/content/docs/integrations/incidentio.mdx

Lines changed: 32 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ List incidents from incident.io. Returns a list of incidents with their details
6262
|`id` | string | Incident ID |
6363
|`name` | string | Incident name/title |
6464
|`summary` | string | Incident summary |
65-
|`description` | string | Incident description |
6665
|`mode` | string | Incident mode \(standard, retrospective, test\) |
6766
|`call_url` | string | Video call URL |
6867
|`severity` | object | Incident severity |
@@ -82,7 +81,7 @@ List incidents from incident.io. Returns a list of incidents with their details
8281
|`is_default` | boolean | Whether this is the default incident type |
8382
|`created_at` | string | When the incident was created \(ISO 8601\) |
8483
|`updated_at` | string | When the incident was last updated \(ISO 8601\) |
85-
|`incident_url` | string | URL to the incident page |
84+
|`permalink` | string | Permalink to the incident in incident.io |
8685
|`slack_channel_id` | string | Slack channel ID |
8786
|`slack_channel_name` | string | Slack channel name |
8887
|`visibility` | string | Incident visibility \(public, private\) |
@@ -116,7 +115,6 @@ Create a new incident in incident.io. Requires idempotency_key, severity_id, and
116115
|`id` | string | Incident ID |
117116
|`name` | string | Incident name |
118117
|`summary` | string | Brief summary of the incident |
119-
|`description` | string | Detailed description of the incident |
120118
|`mode` | string | Incident mode \(e.g., standard, retrospective\) |
121119
|`call_url` | string | URL for the incident call/bridge |
122120
|`severity` | object | Severity of the incident |
@@ -132,7 +130,7 @@ Create a new incident in incident.io. Requires idempotency_key, severity_id, and
132130
|`name` | string | Type name |
133131
|`created_at` | string | Creation timestamp |
134132
|`updated_at` | string | Last update timestamp |
135-
|`incident_url` | string | URL to the incident |
133+
|`permalink` | string | Permalink to the incident in incident.io |
136134
|`slack_channel_id` | string | Associated Slack channel ID |
137135
|`slack_channel_name` | string | Associated Slack channel name |
138136
|`visibility` | string | Incident visibility |
@@ -156,10 +154,9 @@ Retrieve detailed information about a specific incident from incident.io by its
156154
|`id` | string | Incident ID |
157155
|`name` | string | Incident name |
158156
|`summary` | string | Brief summary of the incident |
159-
|`description` | string | Detailed description of the incident |
160157
|`mode` | string | Incident mode \(e.g., standard, retrospective\) |
161158
|`call_url` | string | URL for the incident call/bridge |
162-
|`permalink` | string | Permanent link to the incident |
159+
|`permalink` | string | Permalink to the incident in incident.io |
163160
|`severity` | object | Severity of the incident |
164161
|`id` | string | Severity ID |
165162
|`name` | string | Severity name |
@@ -173,7 +170,6 @@ Retrieve detailed information about a specific incident from incident.io by its
173170
|`name` | string | Type name |
174171
|`created_at` | string | Creation timestamp |
175172
|`updated_at` | string | Last update timestamp |
176-
|`incident_url` | string | URL to the incident |
177173
|`slack_channel_id` | string | Associated Slack channel ID |
178174
|`slack_channel_name` | string | Associated Slack channel name |
179175
|`visibility` | string | Incident visibility |
@@ -205,7 +201,6 @@ Update an existing incident in incident.io. Can update name, summary, severity,
205201
|`id` | string | Incident ID |
206202
|`name` | string | Incident name |
207203
|`summary` | string | Brief summary of the incident |
208-
|`description` | string | Detailed description of the incident |
209204
|`mode` | string | Incident mode \(e.g., standard, retrospective\) |
210205
|`call_url` | string | URL for the incident call/bridge |
211206
|`severity` | object | Severity of the incident |
@@ -221,7 +216,7 @@ Update an existing incident in incident.io. Can update name, summary, severity,
221216
|`name` | string | Type name |
222217
|`created_at` | string | Creation timestamp |
223218
|`updated_at` | string | Last update timestamp |
224-
|`incident_url` | string | URL to the incident |
219+
|`permalink` | string | Permalink to the incident in incident.io |
225220
|`slack_channel_id` | string | Associated Slack channel ID |
226221
|`slack_channel_name` | string | Associated Slack channel name |
227222
|`visibility` | string | Incident visibility |
@@ -486,7 +481,7 @@ Create a new workflow in incident.io.
486481
| `trigger` | string | No | Trigger type for the workflow \(e.g., "incident.updated", "incident.created"\) |
487482
| `steps` | string | No | Array of workflow steps as JSON string. Example: \[\{"label": "Notify team", "name": "slack.post_message"\}\] |
488483
| `condition_groups` | string | No | Array of condition groups as JSON string to control when the workflow runs. Example: \[\{"conditions": \[\{"operation": "one_of", "param_bindings": \[\], "subject": "incident.severity"\}\]\}\] |
489-
| `runs_on_incidents` | string | No | When to run the workflow: "newly_created" \(only new incidents\), "newly_created_and_active" \(new and active incidents\), "active" \(only active incidents\), or "all" \(all incidents\) |
484+
| `runs_on_incidents` | string | No | When to run the workflow: "newly_created" \(only newly created incidents\) or "newly_created_and_active" \(newly created and already active incidents\) |
490485
| `runs_on_incident_modes` | string | No | Array of incident modes to run on as JSON string. Example: \["standard", "retrospective"\] |
491486
| `include_private_incidents` | boolean | No | Whether to include private incidents |
492487
| `continue_on_step_error` | boolean | No | Whether to continue executing subsequent steps if a step fails |
@@ -569,7 +564,7 @@ Update an existing workflow in incident.io.
569564
| `name` | string | Yes | New name for the workflow \(e.g., "Notify on Critical Incidents"\) |
570565
| `steps` | string | Yes | Complete array of workflow steps as a JSON string |
571566
| `condition_groups` | string | Yes | Complete array of workflow condition groups as a JSON string |
572-
| `runs_on_incidents` | string | Yes | When to run the workflow: newly_created, newly_created_and_active, active, or all |
567+
| `runs_on_incidents` | string | Yes | When to run the workflow: newly_created or newly_created_and_active |
573568
| `runs_on_incident_modes` | string | Yes | Complete array of incident modes to run on as a JSON string |
574569
| `include_private_incidents` | boolean | Yes | Whether to include private incidents |
575570
| `continue_on_step_error` | boolean | Yes | Whether to continue executing subsequent steps if a step fails |
@@ -783,11 +778,12 @@ List all escalation policies in incident.io
783778

784779
| Parameter | Type | Description |
785780
| --------- | ---- | ----------- |
786-
| `escalations` | array | List of escalation policies |
787-
|`id` | string | The escalation policy ID |
788-
|`name` | string | The escalation policy name |
789-
|`created_at` | string | When the escalation policy was created |
790-
|`updated_at` | string | When the escalation policy was last updated |
781+
| `escalations` | array | List of escalations |
782+
|`id` | string | The escalation ID |
783+
|`title` | string | The escalation title |
784+
|`status` | string | The current escalation status |
785+
|`created_at` | string | When the escalation was created |
786+
|`updated_at` | string | When the escalation was last updated |
791787
| `pagination_meta` | object | Pagination metadata |
792788
|`after` | string | Cursor for next page |
793789
|`page_size` | number | Number of results per page |
@@ -810,11 +806,12 @@ Create a new escalation policy in incident.io
810806

811807
| Parameter | Type | Description |
812808
| --------- | ---- | ----------- |
813-
| `escalation` | object | The created escalation policy |
814-
|`id` | string | The escalation policy ID |
815-
|`name` | string | The escalation policy name |
816-
|`created_at` | string | When the escalation policy was created |
817-
|`updated_at` | string | When the escalation policy was last updated |
809+
| `escalation` | object | The created escalation |
810+
|`id` | string | The escalation ID |
811+
|`title` | string | The escalation title |
812+
|`status` | string | The current escalation status |
813+
|`created_at` | string | When the escalation was created |
814+
|`updated_at` | string | When the escalation was last updated |
818815

819816
### Show Escalation
820817

@@ -831,11 +828,12 @@ Get details of a specific escalation policy in incident.io
831828

832829
| Parameter | Type | Description |
833830
| --------- | ---- | ----------- |
834-
| `escalation` | object | The escalation policy details |
835-
|`id` | string | The escalation policy ID |
836-
|`name` | string | The escalation policy name |
837-
|`created_at` | string | When the escalation policy was created |
838-
|`updated_at` | string | When the escalation policy was last updated |
831+
| `escalation` | object | The escalation details |
832+
|`id` | string | The escalation ID |
833+
|`title` | string | The escalation title |
834+
|`status` | string | The current escalation status |
835+
|`created_at` | string | When the escalation was created |
836+
|`updated_at` | string | When the escalation was last updated |
839837

840838
### incident.io Custom Fields List
841839

@@ -870,7 +868,7 @@ Create a new custom field in incident.io.
870868
| `apiKey` | string | Yes | incident.io API Key |
871869
| `name` | string | Yes | Name of the custom field \(e.g., "Affected Service"\) |
872870
| `description` | string | Yes | Description of the custom field \(required\) |
873-
| `field_type` | string | Yes | Type of the custom field \(e.g., text, single_select, multi_select, numeric, datetime, link, user, team\) |
871+
| `field_type` | string | Yes | Type of the custom field: text, link, numeric, single_select, or multi_select |
874872

875873
#### Output
876874

@@ -1200,20 +1198,21 @@ List all updates for a specific incident in incident.io
12001198
|`id` | string | The update ID |
12011199
|`incident_id` | string | The incident ID |
12021200
|`message` | string | The update message |
1201+
|`merged_into_incident_id` | string | ID of the incident this incident was merged into |
12031202
|`new_severity` | object | New severity if changed |
12041203
|`id` | string | Severity ID |
12051204
|`name` | string | Severity name |
12061205
|`rank` | number | Severity rank |
1207-
|`new_status` | object | New status if changed |
1206+
|`new_incident_status` | object | The incident status after this update |
12081207
|`id` | string | Status ID |
12091208
|`name` | string | Status name |
12101209
|`category` | string | Status category |
1211-
|`updater` | object | User who created the update |
1212-
|`id` | string | User ID |
1213-
|`name` | string | User name |
1214-
|`email` | string | User email |
1210+
|`updater` | object | Actor who created the update |
1211+
|`user` | object | User who created the update |
1212+
|`id` | string | User ID |
1213+
|`name` | string | User name |
1214+
|`email` | string | User email |
12151215
|`created_at` | string | When the update was created |
1216-
|`updated_at` | string | When the update was last modified |
12171216
| `pagination_meta` | object | Pagination information |
12181217
|`after` | string | Cursor for next page |
12191218
|`page_size` | number | Number of results per page |

apps/sim/tools/generated/tool-metadata.ts

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

apps/sim/tools/generated/tool-outputs.ts

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

apps/sim/tools/incidentio/custom_fields_create.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ export const customFieldsCreateTool: ToolConfig<
3333
type: 'string',
3434
required: true,
3535
visibility: 'user-or-llm',
36-
description:
37-
'Type of the custom field (e.g., text, single_select, multi_select, numeric, datetime, link, user, team)',
36+
description: 'Type of the custom field: text, link, numeric, single_select, or multi_select',
3837
},
3938
},
4039

apps/sim/tools/incidentio/escalations_create.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,13 @@ export const escalationsCreateTool: ToolConfig<
8787
outputs: {
8888
escalation: {
8989
type: 'object',
90-
description: 'The created escalation policy',
90+
description: 'The created escalation',
9191
properties: {
92-
id: { type: 'string', description: 'The escalation policy ID' },
93-
name: { type: 'string', description: 'The escalation policy name' },
94-
created_at: { type: 'string', description: 'When the escalation policy was created' },
95-
updated_at: { type: 'string', description: 'When the escalation policy was last updated' },
92+
id: { type: 'string', description: 'The escalation ID' },
93+
title: { type: 'string', description: 'The escalation title' },
94+
status: { type: 'string', description: 'The current escalation status' },
95+
created_at: { type: 'string', description: 'When the escalation was created' },
96+
updated_at: { type: 'string', description: 'When the escalation was last updated' },
9697
},
9798
},
9899
},

apps/sim/tools/incidentio/escalations_list.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,17 @@ export const escalationsListTool: ToolConfig<
6868
outputs: {
6969
escalations: {
7070
type: 'array',
71-
description: 'List of escalation policies',
71+
description: 'List of escalations',
7272
items: {
7373
type: 'object',
7474
properties: {
75-
id: { type: 'string', description: 'The escalation policy ID' },
76-
name: { type: 'string', description: 'The escalation policy name' },
77-
created_at: { type: 'string', description: 'When the escalation policy was created' },
75+
id: { type: 'string', description: 'The escalation ID' },
76+
title: { type: 'string', description: 'The escalation title' },
77+
status: { type: 'string', description: 'The current escalation status' },
78+
created_at: { type: 'string', description: 'When the escalation was created' },
7879
updated_at: {
7980
type: 'string',
80-
description: 'When the escalation policy was last updated',
81+
description: 'When the escalation was last updated',
8182
},
8283
},
8384
},

apps/sim/tools/incidentio/escalations_show.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,13 @@ export const escalationsShowTool: ToolConfig<
5151
outputs: {
5252
escalation: {
5353
type: 'object',
54-
description: 'The escalation policy details',
54+
description: 'The escalation details',
5555
properties: {
56-
id: { type: 'string', description: 'The escalation policy ID' },
57-
name: { type: 'string', description: 'The escalation policy name' },
58-
created_at: { type: 'string', description: 'When the escalation policy was created' },
59-
updated_at: { type: 'string', description: 'When the escalation policy was last updated' },
56+
id: { type: 'string', description: 'The escalation ID' },
57+
title: { type: 'string', description: 'The escalation title' },
58+
status: { type: 'string', description: 'The current escalation status' },
59+
created_at: { type: 'string', description: 'When the escalation was created' },
60+
updated_at: { type: 'string', description: 'When the escalation was last updated' },
6061
},
6162
},
6263
},

apps/sim/tools/incidentio/incident_updates_list.ts

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,12 @@ export const incidentUpdatesListTool: ToolConfig<
8787
properties: {
8888
id: { type: 'string', description: 'The update ID' },
8989
incident_id: { type: 'string', description: 'The incident ID' },
90-
message: { type: 'string', description: 'The update message' },
90+
message: { type: 'string', description: 'The update message', optional: true },
91+
merged_into_incident_id: {
92+
type: 'string',
93+
description: 'ID of the incident this incident was merged into',
94+
optional: true,
95+
},
9196
new_severity: {
9297
type: 'object',
9398
description: 'New severity if changed',
@@ -98,10 +103,9 @@ export const incidentUpdatesListTool: ToolConfig<
98103
rank: { type: 'number', description: 'Severity rank' },
99104
},
100105
},
101-
new_status: {
106+
new_incident_status: {
102107
type: 'object',
103-
description: 'New status if changed',
104-
optional: true,
108+
description: 'The incident status after this update',
105109
properties: {
106110
id: { type: 'string', description: 'Status ID' },
107111
name: { type: 'string', description: 'Status name' },
@@ -110,15 +114,21 @@ export const incidentUpdatesListTool: ToolConfig<
110114
},
111115
updater: {
112116
type: 'object',
113-
description: 'User who created the update',
117+
description: 'Actor who created the update',
114118
properties: {
115-
id: { type: 'string', description: 'User ID' },
116-
name: { type: 'string', description: 'User name' },
117-
email: { type: 'string', description: 'User email' },
119+
user: {
120+
type: 'object',
121+
description: 'User who created the update',
122+
optional: true,
123+
properties: {
124+
id: { type: 'string', description: 'User ID' },
125+
name: { type: 'string', description: 'User name' },
126+
email: { type: 'string', description: 'User email', optional: true },
127+
},
128+
},
118129
},
119130
},
120131
created_at: { type: 'string', description: 'When the update was created' },
121-
updated_at: { type: 'string', description: 'When the update was last modified' },
122132
},
123133
},
124134
},

apps/sim/tools/incidentio/incidents_create.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ export const incidentsCreateTool: ToolConfig<
101101
id: incident.id,
102102
name: incident.name,
103103
summary: incident.summary,
104-
description: incident.description,
105104
mode: incident.mode,
106105
call_url: incident.call_url,
107106
severity: incident.severity
@@ -126,7 +125,7 @@ export const incidentsCreateTool: ToolConfig<
126125
: undefined,
127126
created_at: incident.created_at,
128127
updated_at: incident.updated_at,
129-
incident_url: incident.incident_url,
128+
permalink: incident.permalink,
130129
slack_channel_id: incident.slack_channel_id,
131130
slack_channel_name: incident.slack_channel_name,
132131
visibility: incident.visibility,
@@ -142,8 +141,7 @@ export const incidentsCreateTool: ToolConfig<
142141
properties: {
143142
id: { type: 'string', description: 'Incident ID' },
144143
name: { type: 'string', description: 'Incident name' },
145-
summary: { type: 'string', description: 'Brief summary of the incident' },
146-
description: { type: 'string', description: 'Detailed description of the incident' },
144+
summary: { type: 'string', description: 'Brief summary of the incident', optional: true },
147145
mode: { type: 'string', description: 'Incident mode (e.g., standard, retrospective)' },
148146
call_url: { type: 'string', description: 'URL for the incident call/bridge' },
149147
severity: {
@@ -174,7 +172,11 @@ export const incidentsCreateTool: ToolConfig<
174172
},
175173
created_at: { type: 'string', description: 'Creation timestamp' },
176174
updated_at: { type: 'string', description: 'Last update timestamp' },
177-
incident_url: { type: 'string', description: 'URL to the incident' },
175+
permalink: {
176+
type: 'string',
177+
description: 'Permalink to the incident in incident.io',
178+
optional: true,
179+
},
178180
slack_channel_id: { type: 'string', description: 'Associated Slack channel ID' },
179181
slack_channel_name: { type: 'string', description: 'Associated Slack channel name' },
180182
visibility: { type: 'string', description: 'Incident visibility' },

apps/sim/tools/incidentio/incidents_list.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ export const incidentsListTool: ToolConfig<
9292
id: incident.id,
9393
name: incident.name,
9494
summary: incident.summary,
95-
description: incident.description,
9695
mode: incident.mode,
9796
call_url: incident.call_url,
9897
severity: incident.severity
@@ -117,7 +116,7 @@ export const incidentsListTool: ToolConfig<
117116
: undefined,
118117
created_at: incident.created_at,
119118
updated_at: incident.updated_at,
120-
incident_url: incident.incident_url,
119+
permalink: incident.permalink,
121120
slack_channel_id: incident.slack_channel_id,
122121
slack_channel_name: incident.slack_channel_name,
123122
visibility: incident.visibility,

0 commit comments

Comments
 (0)