get_assets
Retrieve assets from a CMMS system, filtering by operational status or fetching specific assets by ID to manage manufacturing operations and maintenance tasks.
Instructions
Get assets from CMMS system. Can filter by status or get specific asset.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | No | Filter by asset status | |
| assetId | No | Get specific asset by ID |
Implementation Reference
- src/index.ts:660-676 (handler)The handleGetAssets method executes the logic for the get_assets tool, filtering mock assets by ID or status.
private handleGetAssets(args: { status?: string; assetId?: string }) { let assets = [...mockAssets]; if (args.assetId) { assets = assets.filter((a) => a.id === args.assetId); } else if (args.status) { assets = assets.filter((a) => a.status === args.status); } return { content: [ { type: "text", text: JSON.stringify(assets, null, 2), }, ], }; - src/index.ts:159-174 (registration)The tool definition for get_assets in the MCP listTools handler.
name: "get_assets", description: "Get assets from CMMS system. Can filter by status or get specific asset.", inputSchema: { type: "object", properties: { status: { type: "string", enum: [ "operational", "maintenance", "out-of-service", "retired", ], description: "Filter by asset status", },