Skip to main content
Glama
AnuwatThisuka

CMMS MCP Server

get_sensors

Retrieve IoT sensor data from manufacturing systems. Filter sensors by type, status, or equipment to monitor operational conditions and maintenance needs.

Instructions

Get sensors from IoT system. Can filter by type, status, or equipment.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNoFilter by sensor type
statusNoFilter by sensor status
equipmentIdNoFilter by equipment ID

Implementation Reference

  • The handleGetSensors method implements the logic for the get_sensors tool by filtering mockSensors based on optional arguments (type, status, equipmentId) and returning the result as a text content object.
    private handleGetSensors(args: {
      type?: string;
      status?: string;
      equipmentId?: string;
    }) {
      let sensors = [...mockSensors];
    
      if (args.equipmentId) {
        sensors = sensors.filter((s) => s.equipmentId === args.equipmentId);
      }
      if (args.type) {
        sensors = sensors.filter((s) => s.type === args.type);
      }
      if (args.status) {
        sensors = sensors.filter((s) => s.status === args.status);
      }
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(sensors, null, 2),
          },
        ],
      };
  • src/index.ts:257-275 (registration)
    The get_sensors tool is registered in the IoT Tools section of the MCP server, including its schema definition and description.
    {
      name: "get_sensors",
      description:
        "Get sensors from IoT system. Can filter by type, status, or equipment.",
      inputSchema: {
        type: "object",
        properties: {
          type: {
            type: "string",
            enum: [
              "temperature",
              "pressure",
              "vibration",
              "humidity",
              "flow",
              "level",
            ],
            description: "Filter by sensor type",
          },

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