Skip to main content
Glama
AnuwatThisuka

CMMS MCP Server

get_alerts

Retrieve IoT alerts from manufacturing systems and filter them by severity, acknowledgment status, or specific devices to monitor operational issues.

Instructions

Get IoT alerts. Can filter by severity, acknowledged status, or device.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
severityNoFilter by alert severity
acknowledgedNoFilter by acknowledged status
deviceIdNoFilter by device ID

Implementation Reference

  • The implementation of the get_alerts tool handler.
    private handleGetAlerts(args: {
      severity?: string;
      acknowledged?: boolean;
      deviceId?: string;
    }) {
      let alerts = [...mockAlerts];
    
      if (args.deviceId) {
        alerts = alerts.filter((a) => a.deviceId === args.deviceId);
      }
      if (args.severity) {
        alerts = alerts.filter((a) => a.severity === args.severity);
      }
      if (args.acknowledged !== undefined) {
        alerts = alerts.filter((a) => a.acknowledged === args.acknowledged);
      }
    
      // Sort by timestamp descending
      alerts.sort(
        (a, b) =>
          new Date(b.timestamp).getTime() - new Date(a.timestamp).getTime()
      );
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(alerts, null, 2),
          },
        ],
      };
    }
  • src/index.ts:330-351 (registration)
    Tool registration for get_alerts in the listTools handler.
      name: "get_alerts",
      description:
        "Get IoT alerts. Can filter by severity, acknowledged status, or device.",
      inputSchema: {
        type: "object",
        properties: {
          severity: {
            type: "string",
            enum: ["info", "warning", "critical"],
            description: "Filter by alert severity",
          },
          acknowledged: {
            type: "boolean",
            description: "Filter by acknowledged status",
          },
          deviceId: {
            type: "string",
            description: "Filter by device ID",
          },
        },
      },
    },
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While it mentions filtering, it fails to clarify that this is a read-only operation (crucial given the mutating sibling acknowledge_alert), does not describe the return format, and omits pagination or rate limiting details.

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 consists of two efficient sentences with zero waste. The purpose ('Get IoT alerts') is front-loaded in the first sentence, while the second sentence immediately follows with filtering capabilities.

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

Completeness3/5

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

Given the low complexity (3 simple optional parameters, no nested objects) and lack of output schema or annotations, the description provides minimum viable coverage of the tool's function. However, it lacks details about return values, scope limitations, or operational constraints that would be helpful for a querying tool.

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?

The input schema has 100% description coverage, establishing a baseline of 3. The description maps closely to the schema by listing the three filterable fields (severity, acknowledged status, device) but adds minimal semantic depth beyond what the schema already provides.

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

Purpose4/5

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

The description states a clear verb ('Get') and resource ('IoT alerts'), and the resource type distinguishes it from sibling tools like get_devices or get_assets. However, it does not explicitly differentiate from acknowledge_alert, which is alert-related but performs a mutation action.

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

Usage Guidelines2/5

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

The description mentions filtering capabilities but provides no guidance on when to use this tool versus alternatives like get_devices or acknowledge_alert, nor does it mention prerequisites or conditions for optimal use.

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/AnuwatThisuka/cmms-mcp-server'

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