waroom_update_service_label
Update service labels in Waroom MCP by specifying service name, label UUID, new name, and color code to modify labeling for incident tracking.
Instructions
特定のサービスのラベルを更新します。
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| service_name | Yes | サービス名 | |
| label_uuid | Yes | 更新するラベルのUUID | |
| name | Yes | 新しいラベル名 | |
| color | Yes | 新しいラベルの色(6桁の16進数カラーコード、例: ff0000) |
Implementation Reference
- src/tools/labels.ts:70-102 (registration)Registers the MCP tool 'waroom_update_service_label' including description, input schema with Zod validation, and the handler function that invokes WaroomClient.updateServiceLabel and formats the response.server.tool( 'waroom_update_service_label', '特定のサービスのラベルを更新します。', { service_name: z.string().min(1).max(100).describe('サービス名'), label_uuid: z.string().uuid().describe('更新するラベルのUUID'), 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.updateServiceLabel( params.service_name, params.label_uuid, 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:186-197 (helper)The WaroomClient helper method that performs the HTTP PATCH request to the Waroom API to update a service label by UUID.async updateServiceLabel(serviceName: string, labelUuid: string, name: string, color: string) { try { const response = await this.axiosInstance.patch(`${this.baseUrl}/services/${serviceName}/labels/${labelUuid}`, { label: { name, color } }); return response.data; } catch (error) { throw new Error(`Failed to update service label: ${error}`); }
- src/main.ts:29-29 (registration)Top-level call to createLabelsTools which registers the labels tools including 'waroom_update_service_label' on the MCP server.createLabelsTools(server, waroomClient);