Skip to main content
Glama
AnuwatThisuka

CMMS MCP Server

create_maintenance_task

Create new maintenance tasks for assets in a CMMS system, specifying type, priority, schedule, assignment, and details to manage preventive, corrective, inspection, or calibration work.

Instructions

Create a new maintenance task in CMMS system.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assetIdYesAsset ID for the maintenance task
taskTypeYesType of maintenance task
priorityYesPriority of the task
scheduledDateYesScheduled date (ISO format)
dueDateYesDue date (ISO format)
assignedToYesTechnician ID assigned to the task
descriptionYesDescription of the maintenance task
estimatedDurationNoEstimated duration in minutes

Implementation Reference

  • The handler method `handleCreateMaintenanceTask` executes the tool logic by creating and pushing a new maintenance task to the mock data.
    private handleCreateMaintenanceTask(args: {
      assetId: string;
      taskType: string;
      priority: string;
      scheduledDate: string;
      dueDate: string;
      assignedTo: string;
      description: string;
      estimatedDuration?: number;
    }) {
      const asset = mockAssets.find((a) => a.id === args.assetId);
      if (!asset) {
        throw new Error(`Asset not found: ${args.assetId}`);
      }
    
      const newTask: MaintenanceTask = {
        id: `mt-${String(mockMaintenanceTasks.length + 1).padStart(3, "0")}`,
        taskNumber: `MT-2024-${String(mockMaintenanceTasks.length + 1).padStart(
          3,
          "0"
        )}`,
        assetId: args.assetId,
        assetName: asset.name,
        taskType: args.taskType as any,
        priority: args.priority as any,
        status: "scheduled",
        scheduledDate: args.scheduledDate,
        dueDate: args.dueDate,
        assignedTo: args.assignedTo,
        description: args.description,
        estimatedDuration: args.estimatedDuration || 240,
      };
    
      mockMaintenanceTasks.push(newTask);
    
      return {
        content: [
          {
  • src/index.ts:204-235 (registration)
    Registration of the "create_maintenance_task" tool including its input schema definition.
    {
      name: "create_maintenance_task",
      description: "Create a new maintenance task in CMMS system.",
      inputSchema: {
        type: "object",
        properties: {
          assetId: {
            type: "string",
            description: "Asset ID for the maintenance task",
          },
          taskType: {
            type: "string",
            enum: ["preventive", "corrective", "inspection", "calibration"],
            description: "Type of maintenance task",
          },
          priority: {
            type: "string",
            enum: ["low", "medium", "high", "critical"],
            description: "Priority of the task",
          },
          scheduledDate: {
            type: "string",
            description: "Scheduled date (ISO format)",
          },
          dueDate: {
            type: "string",
            description: "Due date (ISO format)",
          },
          assignedTo: {
            type: "string",
            description: "Technician ID assigned to the task",
          },

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