waroom_get_services
Retrieve a paginated list of services from the Waroom MCP server, specifying page number and items per page for precise data management.
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-33 (handler)The handler function for the waroom_get_services tool. It fetches services from WaroomClient using pagination parameters, returns formatted JSON response, or an 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)Input schema defining optional pagination parameters: page (default 1) and per_page (default 50, max 100).{ 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/tools/services.ts:6-34 (registration)Registration of the waroom_get_services tool via server.tool(), including name, description, input schema, and inline handler function.server.tool( 'waroom_get_services', 'サービスの一覧を取得します。', { 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'), }, 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/main.ts:28-28 (registration)Invocation of createServicesTools in the main server setup, which registers the waroom_get_services tool among others.createServicesTools(server, waroomClient);