Skip to main content
Glama
AnuwatThisuka

CMMS MCP Server

get_maintenance_history

Retrieve maintenance history from CMMS systems by filtering specific assets or date ranges to track equipment performance and maintenance activities.

Instructions

Get maintenance history from CMMS system. Can filter by asset or date range.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assetIdNoFilter by asset ID
startDateNoStart date for history (ISO format)
endDateNoEnd date for history (ISO format)

Implementation Reference

  • Handler for the 'get_maintenance_history' tool, which filters maintenance history by optional assetId, startDate, and endDate.
    private handleGetMaintenanceHistory(args: {
      assetId?: string;
      startDate?: string;
      endDate?: string;
    }) {
      let history = [...mockMaintenanceHistory];
    
      if (args.assetId) {
        history = history.filter((h) => h.assetId === args.assetId);
      }
      if (args.startDate) {
        const start = new Date(args.startDate);
        history = history.filter((h) => new Date(h.completedDate) >= start);
      }
      if (args.endDate) {
        const end = new Date(args.endDate);
        history = history.filter((h) => new Date(h.completedDate) <= end);
      }
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(history, null, 2),
          },
        ],
      };
    }
  • src/index.ts:182-203 (registration)
    Registration of the 'get_maintenance_history' tool with its schema definition in the MCP server setup.
    {
      name: "get_maintenance_history",
      description:
        "Get maintenance history from CMMS system. Can filter by asset or date range.",
      inputSchema: {
        type: "object",
        properties: {
          assetId: {
            type: "string",
            description: "Filter by asset ID",
          },
          startDate: {
            type: "string",
            description: "Start date for history (ISO format)",
          },
          endDate: {
            type: "string",
            description: "End date for history (ISO format)",
          },
        },
      },
    },
  • src/index.ts:392-393 (registration)
    Tool request handler switch case for 'get_maintenance_history' that maps the request to its corresponding handler function.
    case "get_maintenance_history":
      return this.handleGetMaintenanceHistory(args as any);
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 'Get' implies a read-only operation, the description lacks details about pagination, rate limits, data retention windows, or what specific maintenance events constitute 'history' in the return payload.

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 redundancy. The first sentence establishes purpose and system context, while the second summarizes filtering capabilities. Every word earns its place without unnecessary elaboration.

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?

For a three-parameter query tool with full schema documentation and no output schema, the description meets minimum viability. However, given the absence of annotations and output schema, it could be strengthened by clarifying what maintenance history entails (e.g., completed work orders, repairs) to distinguish it from sibling maintenance tools.

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?

With 100% schema description coverage, the schema already documents all three parameters (assetId, startDate, endDate) adequately. The description adds minimal semantic value beyond grouping them as 'asset or date range' filters, meeting the baseline expectation when schema coverage is high.

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 uses a specific verb ('Get') and resource ('maintenance history from CMMS system'), clearly identifying the tool's function. However, it does not explicitly differentiate from the sibling tool 'get_maintenance_tasks', which could cause confusion about whether to query historical records versus active task lists.

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 ('Can filter by asset or date range') but provides no explicit guidance on when to use this tool versus siblings like 'get_maintenance_tasks' or 'get_work_orders', nor does it mention prerequisites such as requiring valid asset IDs from the CMMS system.

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