Skip to main content
Glama
metrxbots

Metrx MCP Server

by metrxbots

metrx_acknowledge_alert

Mark alerts as read to clear them from the unread list while preserving them in history. Use after addressing the underlying issue to maintain organized alert tracking.

Instructions

Mark one or more alerts as read/acknowledged. This removes them from the unread alerts list but preserves them in history. Do NOT use for resolving the underlying issue — take action on the alert first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
alert_idsYesAlert IDs to acknowledge

Implementation Reference

  • The acknowledge_alert handler function that executes the alert acknowledgment logic. It makes a PATCH request to /alerts with action 'acknowledge' and the provided alert_ids, returning a success message with the count of acknowledged alerts.
    async ({ alert_ids }) => {
      const result = await client.patch<{ acknowledged: number }>('/alerts', {
        action: 'acknowledge',
        alert_ids,
      });
    
      if (result.error) {
        return {
          content: [{ type: 'text', text: `Error acknowledging alerts: ${result.error}` }],
          isError: true,
        };
      }
    
      return {
        content: [
          {
            type: 'text',
            text: `✅ ${result.data?.acknowledged || alert_ids.length} alert(s) acknowledged.`,
          },
        ],
      };
    }
  • Registration of the acknowledge_alert tool with the MCP server. Includes tool metadata (title, description), annotations (readOnlyHint, destructiveHint, idempotentHint, openWorldHint), and the handler function.
    server.registerTool(
      'acknowledge_alert',
      {
        title: 'Acknowledge Alert',
        description:
          'Mark one or more alerts as read/acknowledged. ' +
          'This removes them from the unread alerts list but preserves them in history. ' +
          'Do NOT use for resolving the underlying issue — take action on the alert first.',
        inputSchema: {
          alert_ids: z.array(z.string().uuid()).min(1).max(50).describe('Alert IDs to acknowledge'),
        },
        annotations: {
          readOnlyHint: false,
          destructiveHint: false,
          idempotentHint: true,
          openWorldHint: false,
        },
      },
      async ({ alert_ids }) => {
        const result = await client.patch<{ acknowledged: number }>('/alerts', {
          action: 'acknowledge',
          alert_ids,
        });
    
        if (result.error) {
          return {
            content: [{ type: 'text', text: `Error acknowledging alerts: ${result.error}` }],
            isError: true,
          };
        }
    
        return {
          content: [
            {
              type: 'text',
              text: `✅ ${result.data?.acknowledged || alert_ids.length} alert(s) acknowledged.`,
            },
          ],
        };
      }
    );
  • Input schema for the acknowledge_alert tool. Validates that alert_ids is an array of 1-50 UUID strings.
    inputSchema: {
      alert_ids: z.array(z.string().uuid()).min(1).max(50).describe('Alert IDs to acknowledge'),
    },

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/metrxbots/metrx-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server