Skip to main content
Glama
topotal

Waroom MCP

by topotal

waroom_update_incident_labels

Add or update labels on incidents in Waroom MCP to categorize and organize incident data for better tracking and analysis.

Instructions

インシデントにラベルを付与または更新します。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
incident_uuidYes対象インシデントのUUID
label_uuidsYes付与するラベルのUUID配列

Implementation Reference

  • The handler function that executes the tool logic: calls WaroomClient.updateIncidentLabels with provided parameters and returns the JSON response or an error message in MCP format.
      async (params) => {
        try {
          const response = await waroomClient.updateIncidentLabels(
            params.incident_uuid,
            params.label_uuids
          );
          return {
            content: [{
              type: 'text',
              text: JSON.stringify(response, null, 2)
            }]
          };
        } catch (error) {
          return {
            content: [{
              type: 'text',
              text: `インシデントラベルの更新に失敗しました: ${error}`
            }]
          };
        }
      }
    );
  • Zod schema defining the input parameters for the tool: incident_uuid (UUID string) and label_uuids (array of UUID strings).
    {
      incident_uuid: z.string().uuid().describe('対象インシデントのUUID'),
      label_uuids: z.array(z.string().uuid()).describe('付与するラベルのUUID配列'),
    },
  • Registers the 'waroom_update_incident_labels' tool on the MCP server, specifying name, description, input schema, and handler function.
    server.tool(
      'waroom_update_incident_labels',
      'インシデントにラベルを付与または更新します。',
      {
        incident_uuid: z.string().uuid().describe('対象インシデントのUUID'),
        label_uuids: z.array(z.string().uuid()).describe('付与するラベルのUUID配列'),
      },
      async (params) => {
        try {
          const response = await waroomClient.updateIncidentLabels(
            params.incident_uuid,
            params.label_uuids
          );
          return {
            content: [{
              type: 'text',
              text: JSON.stringify(response, null, 2)
            }]
          };
        } catch (error) {
          return {
            content: [{
              type: 'text',
              text: `インシデントラベルの更新に失敗しました: ${error}`
            }]
          };
        }
      }
    );
  • The WaroomClient helper method that performs the actual API PATCH request to update labels on an incident.
    async updateIncidentLabels(incidentUuid: string, labelUuids: string[]) {
      try {
        const response = await this.axiosInstance.patch(`${this.baseUrl}/incidents/${incidentUuid}/labels`, {
          label_uuids: labelUuids
        });
        return response.data;
      } catch (error) {
        throw new Error(`Failed to update incident labels: ${error}`);
      }
    }

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