waroom_update_incident_severity
Update the severity level of an incident in Waroom MCP by specifying its UUID and new severity (critical, high, low, info, or unknown).
Instructions
インシデントの重要度を更新します。
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| incident_uuid | Yes | 更新するインシデントのUUID | |
| severity | Yes | 新しい重要度(critical, high, low, info, unknown) |
Implementation Reference
- src/tools/incidents.ts:114-131 (handler)The handler function for the 'waroom_update_incident_severity' tool. It calls WaroomClient.updateIncidentSeverity with the incident UUID and new severity, formats the response as JSON text, or returns an error message on failure.async (params) => { try { const response = await waroomClient.updateIncidentSeverity(params.incident_uuid, params.severity); return { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] }; } catch (error) { return { content: [{ type: 'text', text: `インシデント重要度の更新に失敗しました: ${error}` }] }; } }
- src/tools/incidents.ts:110-113 (schema)Zod schema defining the input parameters for the tool: incident_uuid (UUID string) and severity (one of 'critical', 'high', 'low', 'info', 'unknown').{ incident_uuid: z.string().uuid().describe('更新するインシデントのUUID'), severity: z.enum(['critical', 'high', 'low', 'info', 'unknown']).describe('新しい重要度(critical, high, low, info, unknown)'), },
- src/tools/incidents.ts:107-132 (registration)Registers the 'waroom_update_incident_severity' tool on the MCP server with its description, input schema, and handler function.server.tool( 'waroom_update_incident_severity', 'インシデントの重要度を更新します。', { incident_uuid: z.string().uuid().describe('更新するインシデントのUUID'), severity: z.enum(['critical', 'high', 'low', 'info', 'unknown']).describe('新しい重要度(critical, high, low, info, unknown)'), }, async (params) => { try { const response = await waroomClient.updateIncidentSeverity(params.incident_uuid, params.severity); return { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] }; } catch (error) { return { content: [{ type: 'text', text: `インシデント重要度の更新に失敗しました: ${error}` }] }; } } );
- src/WaroomClient.ts:127-136 (helper)Supporting method in WaroomClient that performs the actual API PUT request to update the incident's severity.async updateIncidentSeverity(incidentUuid: string, severity: string) { try { const response = await this.axiosInstance.put(`${this.baseUrl}/incidents/${incidentUuid}/severity`, { severity }); return response.data; } catch (error) { throw new Error(`Failed to update incident severity: ${error}`); } }
- src/main.ts:26-26 (registration)Top-level call to createIncidentsTools, which registers all incident-related tools including 'waroom_update_incident_severity'.createIncidentsTools(server, waroomClient);