Skip to main content
Glama
topotal

Waroom MCP

by topotal

waroom_get_incidents

Retrieve incident lists from Waroom MCP with filtering options for service, status, severity, date range, and root cause analysis.

Instructions

インシデントの一覧を取得します。各種フィルター条件を指定できます。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNo取得するページ番号(1以上の整数)。デフォルト: 1
per_pageNo1ページあたりの取得数(1-100)。デフォルト: 50
service_namesNoフィルタリング対象のサービス名の配列
statusNoインシデントステータス(resolved, close, detected, investigating, fixing)
root_causeNo根本原因
severitiesNo重要度の配列(critical, high, low, info, unknown)
fromNo開始日(YYYY-MM-DD形式 例: 2023-01-01)
toNo終了日(YYYY-MM-DD形式 例: 2023-12-31)
includes_experimentalNo実験的なインシデントを含めるかどうか
label_namesNoフィルタリング対象のラベル名の配列
commander_idNoコマンダーのID(正の整数)

Implementation Reference

  • Registration of the 'waroom_get_incidents' MCP tool, including input schema (Zod), description, and inline handler function that calls WaroomClient.getIncidents and returns formatted response.
    server.tool( 'waroom_get_incidents', 'インシデントの一覧を取得します。各種フィルター条件を指定できます。', { page: z.number().int().min(1).optional().describe('取得するページ番号(1以上の整数)。デフォルト: 1'), per_page: z.number().int().min(1).max(100).optional().describe('1ページあたりの取得数(1-100)。デフォルト: 50'), service_names: z.array(z.string().min(1)).min(1).optional().describe('フィルタリング対象のサービス名の配列'), status: z.enum(['resolved', 'close', 'detected', 'investigating', 'fixing']).optional().describe('インシデントステータス(resolved, close, detected, investigating, fixing)'), root_cause: z.enum(['unspecified', 'code_bug', 'configuration_error', 'deployment_failure', 'infrastructure_failure', 'operational_failure', 'third_party_outage', 'other']).optional().describe('根本原因'), severities: z.array(z.enum(['critical', 'high', 'low', 'info', 'unknown'])).min(1).optional().describe('重要度の配列(critical, high, low, info, unknown)'), from: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional().describe('開始日(YYYY-MM-DD形式 例: 2023-01-01)'), to: z.string().regex(/^\d{4}-\d{2}-\d{2}$/).optional().describe('終了日(YYYY-MM-DD形式 例: 2023-12-31)'), includes_experimental: z.boolean().optional().describe('実験的なインシデントを含めるかどうか'), label_names: z.array(z.string().min(1)).min(1).optional().describe('フィルタリング対象のラベル名の配列'), commander_id: z.number().int().positive().optional().describe('コマンダーのID(正の整数)'), }, async (params) => { try { const { page = 1, per_page = 50, ...filters } = params; const response = await waroomClient.getIncidents(page, per_page, filters); return { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] }; } catch (error) { return { content: [{ type: 'text', text: `インシデント一覧の取得に失敗しました: ${error}` }] }; } } );
  • WaroomClient.getIncidents helper method: constructs query parameters from filters and makes API call to fetch paginated list of incidents with applied filters.
    async getIncidents(page = 1, perPage = 50, filters: any = {}) { try { const params: any = { page, per_page: perPage }; // フィルターパラメーターを追加 if (filters.service_names?.length) params.service_names = filters.service_names.join(','); if (filters.status) params.status = filters.status; if (filters.root_cause) params.root_cause = filters.root_cause; if (filters.severities?.length) params.severities = filters.severities.join(','); if (filters.from) params.from = filters.from; if (filters.to) params.to = filters.to; if (filters.includes_experimental !== undefined) params.includes_experimental = filters.includes_experimental; if (filters.label_names?.length) params.label_names = filters.label_names.join(','); if (filters.commander_id) params.commander_id = filters.commander_id; const response = await this.axiosInstance.get(`${this.baseUrl}/incidents`, { params }); return response.data; } catch (error) { throw new Error(`Failed to get incidents: ${error}`); }
  • src/main.ts:26-29 (registration)
    Top-level invocation of createIncidentsTools (among others) to register all incident-related tools, including waroom_get_incidents, to the MCP server.
    createIncidentsTools(server, waroomClient); createPostmortemsTools(server, waroomClient); createServicesTools(server, waroomClient); createLabelsTools(server, waroomClient);

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