Skip to main content
Glama
AnuwatThisuka

CMMS MCP Server

get_work_orders

Retrieve work orders from manufacturing systems with filtering options by status or production order ID to manage maintenance tasks and operations.

Instructions

Get work orders from MES system. Can filter by status or production order.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusNoFilter by work order status
productionOrderIdNoFilter by production order ID

Implementation Reference

  • The handleGetWorkOrders function implements the core logic for the 'get_work_orders' tool, filtering mock data based on input arguments.
    private handleGetWorkOrders(args: {
      status?: string;
      productionOrderId?: string;
    }) {
      let orders = [...mockWorkOrders];
    
      if (args.productionOrderId) {
        orders = orders.filter(
          (o) => o.productionOrderId === args.productionOrderId
        );
      }
      if (args.status) {
        orders = orders.filter((o) => o.status === args.status);
      }
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(orders, null, 2),
          },
        ],
      };
    }
  • src/index.ts:84-102 (registration)
    The 'get_work_orders' tool registration within the ListToolsRequestSchema handler.
    {
      name: "get_work_orders",
      description:
        "Get work orders from MES system. Can filter by status or production order.",
      inputSchema: {
        type: "object",
        properties: {
          status: {
            type: "string",
            enum: ["pending", "in-progress", "completed", "on-hold"],
            description: "Filter by work order status",
          },
          productionOrderId: {
            type: "string",
            description: "Filter by production order ID",
          },
        },
      },
    },

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