waroom_get_services
Retrieve a paginated list of services from the Waroom API to access incident information and postmortem details through standardized queries.
Instructions
サービスの一覧を取得します。
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | 取得するページ番号(1以上の整数)。デフォルト: 1 | |
| per_page | No | 1ページあたりの取得数(1-100)。デフォルト: 50 |
Implementation Reference
- src/tools/services.ts:13-34 (handler)The asynchronous handler function for the waroom_get_services tool. It retrieves services using waroomClient.getServices with pagination parameters and returns a JSON string response or error message.async (params) => { try { const response = await waroomClient.getServices( params.page || 1, params.per_page || 50 ); return { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] }; } catch (error) { return { content: [{ type: 'text', text: `サービス一覧の取得に失敗しました: ${error}` }] }; } } );
- src/tools/services.ts:9-12 (schema)Zod input schema defining optional page and per_page parameters for pagination.{ 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'), },
- src/main.ts:28-28 (registration)Invocation of createServicesTools which registers the waroom_get_services tool (among others) with the MCP server.createServicesTools(server, waroomClient);
- src/WaroomClient.ts:80-89 (helper)The getServices method in WaroomClient class that fetches the list of services from the Waroom API using axios with pagination support.async getServices(page = 1, perPage = 50) { try { const response = await this.axiosInstance.get(`${this.baseUrl}/services`, { params: { page, per_page: perPage } }); return response.data; } catch (error) { throw new Error(`Failed to get services: ${error}`); } }