Skip to main content
Glama
metrxbots

Metrx MCP Server

by metrxbots

Acknowledge Alert

metrx_acknowledge_alert
Idempotent

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'),
    },
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description adds valuable behavioral context beyond annotations: it explains that acknowledging 'removes them from the unread alerts list but preserves them in history,' clarifying the effect on alert visibility and retention. Annotations cover idempotency and non-destructive aspects, but the description enhances understanding of the tool's impact on alert states without contradicting annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose in the first sentence, followed by critical usage guidance in the second. Both sentences are essential—the first defines the action, and the second prevents misuse—making it highly efficient with zero wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (mutation with idempotency), rich annotations (e.g., idempotentHint, destructiveHint), and no output schema, the description is nearly complete. It covers purpose, usage, and behavioral effects, though it could slightly enhance completeness by mentioning the response format or error handling, but this is minor given the annotations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the parameter 'alert_ids' fully documented in the schema. The description does not add any parameter-specific details beyond what the schema provides, such as format or constraints, so it meets the baseline of 3 where the schema handles parameter documentation adequately.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Mark one or more alerts as read/acknowledged') and the resource ('alerts'), distinguishing it from siblings like metrx_get_alerts (which retrieves alerts) and metrx_configure_alert_threshold (which modifies alert settings). It precisely defines the tool's function without being tautological.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use ('Mark one or more alerts as read/acknowledged') and when not to use ('Do NOT use for resolving the underlying issue — take action on the alert first'), including a clear alternative action ('take action on the alert first'). This helps the agent avoid misuse in favor of other tools for issue resolution.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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