waroom_create_service_label
Create custom labels for specific services on the Waroom MCP server, specifying a label name and color using a 6-digit hex code for clear categorization.
Instructions
特定のサービスに新しいラベルを作成します。
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| color | Yes | ラベルの色(6桁の16進数カラーコード、例: ff0000) | |
| name | Yes | ラベル名 | |
| service_name | Yes | サービス名 |
Implementation Reference
- src/tools/labels.ts:46-67 (handler)MCP tool handler for 'waroom_create_service_label'. Calls WaroomClient.createServiceLabel(params), returns JSON response or error message.async (params) => { try { const response = await waroomClient.createServiceLabel( params.service_name, params.name, params.color ); return { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] }; } catch (error) { return { content: [{ type: 'text', text: `サービスラベルの作成に失敗しました: ${error}` }] }; } }
- src/tools/labels.ts:41-45 (schema)Input schema (Zod) for the tool: service_name, name, color (hex).{ service_name: z.string().min(1).max(100).describe('サービス名'), name: z.string().min(1).max(100).describe('ラベル名'), color: z.string().regex(/^[0-9a-fA-F]{6}$/).describe('ラベルの色(6桁の16進数カラーコード、例: ff0000)'), },
- src/tools/labels.ts:38-68 (registration)Registration of the 'waroom_create_service_label' tool via server.tool() call within createLabelsTools, including name, description, schema, and handler.server.tool( 'waroom_create_service_label', '特定のサービスに新しいラベルを作成します。', { service_name: z.string().min(1).max(100).describe('サービス名'), name: z.string().min(1).max(100).describe('ラベル名'), color: z.string().regex(/^[0-9a-fA-F]{6}$/).describe('ラベルの色(6桁の16進数カラーコード、例: ff0000)'), }, async (params) => { try { const response = await waroomClient.createServiceLabel( params.service_name, params.name, params.color ); return { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] }; } catch (error) { return { content: [{ type: 'text', text: `サービスラベルの作成に失敗しました: ${error}` }] }; } } );
- src/WaroomClient.ts:172-184 (helper)WaroomClient helper method that performs the actual API POST request to create a service label.async createServiceLabel(serviceName: string, name: string, color: string) { try { const response = await this.axiosInstance.post(`${this.baseUrl}/services/${serviceName}/labels`, { label: { name, color } }); return response.data; } catch (error) { throw new Error(`Failed to create service label: ${error}`); } }