Skip to main content
Glama
topotal

Waroom MCP

by topotal

waroom_create_incident_metrics

Create incident metrics to record response activities and update TTD/TTA/TTI/TTF/TTR values for incident tracking and analysis.

Instructions

インシデントメトリクスを作成します。レスポンス活動を記録し、TTD/TTA/TTI/TTF/TTRを更新します。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
incident_uuidYes対象インシデントのUUID
activity_actionYes活動アクション(status: detected/investigating/fixing/resolved/close/triggered, severity: critical/high/low/info/unknown, root_cause: unspecified/code_bug/configuration_error/deployment_failure/infrastructure_failure/operational_failure/third_party_outage/other)
triggered_atYes実行時刻(ISO 8601形式、例: 2023-01-01T12:00:00Z)

Implementation Reference

  • The handler function that executes the tool logic by calling WaroomClient.createIncidentMetrics and formatting the response as MCP content.
    async (params) => {
      try {
        const response = await waroomClient.createIncidentMetrics(
          params.incident_uuid,
          params.activity_action,
          params.triggered_at
        );
        return {
          content: [{
            type: 'text',
            text: JSON.stringify(response, null, 2)
          }]
        };
      } catch (error) {
        return {
          content: [{
            type: 'text',
            text: `インシデントメトリクスの作成に失敗しました: ${error}`
          }]
        };
      }
  • Zod input schema defining parameters for the tool: incident_uuid, activity_action, and triggered_at.
    {
      incident_uuid: z.string().uuid().describe('対象インシデントのUUID'),
      activity_action: z.enum(['detected', 'investigating', 'fixing', 'resolved', 'close', 'triggered', 'critical', 'high', 'low', 'info', 'unknown', 'unspecified', 'code_bug', 'configuration_error', 'deployment_failure', 'infrastructure_failure', 'operational_failure', 'third_party_outage', 'other']).describe('活動アクション(status: detected/investigating/fixing/resolved/close/triggered, severity: critical/high/low/info/unknown, root_cause: unspecified/code_bug/configuration_error/deployment_failure/infrastructure_failure/operational_failure/third_party_outage/other)'),
      triggered_at: z.string().regex(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{3})?([+-]\d{2}:\d{2}|Z)$/).describe('実行時刻(ISO 8601形式、例: 2023-01-01T12:00:00Z)'),
    },
  • src/main.ts:26-26 (registration)
    Top-level registration call that invokes createIncidentsTools to register the incidents tools group, including waroom_create_incident_metrics.
    createIncidentsTools(server, waroomClient);
  • Direct registration of the waroom_create_incident_metrics tool using server.tool, including description, schema, and handler.
    server.tool(
      'waroom_create_incident_metrics',
      'インシデントメトリクスを作成します。レスポンス活動を記録し、TTD/TTA/TTI/TTF/TTRを更新します。',
      {
        incident_uuid: z.string().uuid().describe('対象インシデントのUUID'),
        activity_action: z.enum(['detected', 'investigating', 'fixing', 'resolved', 'close', 'triggered', 'critical', 'high', 'low', 'info', 'unknown', 'unspecified', 'code_bug', 'configuration_error', 'deployment_failure', 'infrastructure_failure', 'operational_failure', 'third_party_outage', 'other']).describe('活動アクション(status: detected/investigating/fixing/resolved/close/triggered, severity: critical/high/low/info/unknown, root_cause: unspecified/code_bug/configuration_error/deployment_failure/infrastructure_failure/operational_failure/third_party_outage/other)'),
        triggered_at: z.string().regex(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{3})?([+-]\d{2}:\d{2}|Z)$/).describe('実行時刻(ISO 8601形式、例: 2023-01-01T12:00:00Z)'),
      },
      async (params) => {
        try {
          const response = await waroomClient.createIncidentMetrics(
            params.incident_uuid,
            params.activity_action,
            params.triggered_at
          );
          return {
            content: [{
              type: 'text',
              text: JSON.stringify(response, null, 2)
            }]
          };
        } catch (error) {
          return {
            content: [{
              type: 'text',
              text: `インシデントメトリクスの作成に失敗しました: ${error}`
            }]
          };
        }
      }
    );
  • Supporting method in WaroomClient that performs the actual API call to create incident metrics.
    async createIncidentMetrics(incidentUuid: string, activityAction: string, triggeredAt: string) {
      try {
        const response = await this.axiosInstance.post(`${this.baseUrl}/incidents/${incidentUuid}/metrics`, {
          activity_action: activityAction,
          triggered_at: triggeredAt
        });
        return response.data;
      } catch (error) {
        throw new Error(`Failed to create incident metrics: ${error}`);
      }
    }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/topotal/waroom-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server