get_devices
Retrieve IoT devices from manufacturing systems with optional filters for status or type to monitor operational assets.
Instructions
Get IoT devices. Can filter by status or type.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | No | Filter by device status | |
| type | No | Filter by device type |
Implementation Reference
- src/index.ts:815-833 (handler)The handler function `handleGetDevices` that processes the tool request.
private handleGetDevices(args: { status?: string; type?: string }) { let devices = [...mockDevices]; if (args.status) { devices = devices.filter((d) => d.status === args.status); } if (args.type) { devices = devices.filter((d) => d.type === args.type); } return { content: [ { type: "text", text: JSON.stringify(devices, null, 2), }, ], }; } - src/index.ts:312-325 (registration)Registration of the `get_devices` tool, including its input schema and description.
name: "get_devices", description: "Get IoT devices. Can filter by status or type.", inputSchema: { type: "object", properties: { status: { type: "string", enum: ["online", "offline", "error"], description: "Filter by device status", }, type: { type: "string", description: "Filter by device type", },