get_maintenance_tasks
Retrieve maintenance tasks from a CMMS system with filters for status, priority, type, or asset to manage work orders and track repairs.
Instructions
Get maintenance tasks from CMMS system. Can filter by status, priority, or type.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_maintenance_tasks"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | No | Filter by task status | |
| priority | No | Filter by priority | |
| taskType | No | Filter by task type | |
| assetId | No | Filter by asset ID |
Implementation Reference
- src/index.ts:629-655 (handler)The implementation of the get_maintenance_tasks tool handler.
private handleGetMaintenanceTasks(args: { status?: string; priority?: string; taskType?: string; assetId?: string; }) { let tasks = [...mockMaintenanceTasks]; if (args.assetId) { tasks = tasks.filter((t) => t.assetId === args.assetId); } if (args.status) { tasks = tasks.filter((t) => t.status === args.status); } if (args.priority) { tasks = tasks.filter((t) => t.priority === args.priority); } if (args.taskType) { tasks = tasks.filter((t) => t.taskType === args.taskType); } return { content: [ { type: "text", text: JSON.stringify(tasks, null, 2), }, - src/index.ts:123-146 (registration)Registration of the get_maintenance_tasks tool including its schema definition.
{ name: "get_maintenance_tasks", description: "Get maintenance tasks from CMMS system. Can filter by status, priority, or type.", inputSchema: { type: "object", properties: { status: { type: "string", enum: [ "scheduled", "in-progress", "completed", "cancelled", "overdue", ], description: "Filter by task status", }, priority: { type: "string", enum: ["low", "medium", "high", "critical"], description: "Filter by priority", }, taskType: {