waroom_update_incident_status
Update the status of an incident in Waroom MCP using its UUID and a new status (detected, investigating, fixing, resolved, close).
Instructions
インシデントのステータスを更新します。
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| incident_uuid | Yes | 更新するインシデントのUUID | |
| status | Yes | 新しいステータス(detected, investigating, fixing, resolved, close) |
Implementation Reference
- src/tools/incidents.ts:134-159 (registration)Registration of the 'waroom_update_incident_status' tool using server.tool, including schema and inline handler function.server.tool( 'waroom_update_incident_status', 'インシデントのステータスを更新します。', { incident_uuid: z.string().uuid().describe('更新するインシデントのUUID'), status: z.enum(['detected', 'investigating', 'fixing', 'resolved', 'close']).describe('新しいステータス(detected, investigating, fixing, resolved, close)'), }, async (params) => { try { const response = await waroomClient.updateIncidentStatus(params.incident_uuid, params.status); return { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] }; } catch (error) { return { content: [{ type: 'text', text: `インシデントステータスの更新に失敗しました: ${error}` }] }; } } );
- src/tools/incidents.ts:141-158 (handler)The MCP tool handler that calls WaroomClient.updateIncidentStatus and formats the response as MCP content.async (params) => { try { const response = await waroomClient.updateIncidentStatus(params.incident_uuid, params.status); return { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] }; } catch (error) { return { content: [{ type: 'text', text: `インシデントステータスの更新に失敗しました: ${error}` }] }; } }
- src/tools/incidents.ts:137-140 (schema)Zod schema defining input parameters: incident_uuid (UUID string) and status (enum).{ incident_uuid: z.string().uuid().describe('更新するインシデントのUUID'), status: z.enum(['detected', 'investigating', 'fixing', 'resolved', 'close']).describe('新しいステータス(detected, investigating, fixing, resolved, close)'), },
- src/WaroomClient.ts:138-147 (helper)WaroomClient helper method that performs the actual API PUT request to update the incident status.async updateIncidentStatus(incidentUuid: string, status: string) { try { const response = await this.axiosInstance.put(`${this.baseUrl}/incidents/${incidentUuid}/status`, { status }); return response.data; } catch (error) { throw new Error(`Failed to update incident status: ${error}`); } }