ninja_get_device_disks
Retrieve physical disk drive information for a specified device using its device ID. Access detailed disk data from the NinjaOne platform.
Instructions
Get physical disk drive information for a device.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Device ID |
Implementation Reference
- src/tools/devices.ts:232-232 (handler)The handler function for ninja_get_device_disks that calls GET /device/{id}/disks via the NinjaOneClient.
handler: async ({ id }, client: NinjaOneClient) => client.get(`/device/${id}/disks`), - src/tools/devices.ts:220-233 (schema)The tool definition including name, description, and inputSchema for ninja_get_device_disks. Requires a numeric 'id' property.
{ tool: { name: 'ninja_get_device_disks', description: 'Get physical disk drive information for a device.', inputSchema: { type: 'object', required: ['id'], properties: { id: { type: 'number', description: 'Device ID' }, }, }, }, handler: async ({ id }, client: NinjaOneClient) => client.get(`/device/${id}/disks`), }, - src/tools/index.ts:13-14 (registration)The tool is exported as part of deviceTools array, which is spread into ALL_TOOLS in src/tools/index.ts for registration with the MCP server.
export const ALL_TOOLS = [ ...deviceTools, - src/index.ts:31-32 (registration)The ALL_TOOLS array is used to build the tool map and register tools with the MCP ListToolsRequestSchema handler.
server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: ALL_TOOLS.map((def) => def.tool), - src/index.ts:24-24 (registration)The ALL_TOOLS array is used to build a handler map (tool name -> handler) which is looked up in CallToolRequestSchema.
const toolMap = new Map(ALL_TOOLS.map((def) => [def.tool.name, def.handler]));