ninja_submit_software_patch_scan
Initiate a software patch scan on a specific device to identify missing updates and security patches.
Instructions
Trigger a software patch scan on a device.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Device ID |
Implementation Reference
- src/tools/devices.ts:457-471 (handler)Tool definition and handler for ninja_submit_software_patch_scan. The handler triggers a software patch scan on a device by calling POST /device/{id}/patch/software/scan.
{ tool: { name: 'ninja_submit_software_patch_scan', description: 'Trigger a software patch scan on a device.', inputSchema: { type: 'object', required: ['id'], properties: { id: { type: 'number', description: 'Device ID' }, }, }, }, handler: async ({ id }, client: NinjaOneClient) => client.post(`/device/${id}/patch/software/scan`), }, - src/tools/devices.ts:461-467 (schema)Input schema for ninja_submit_software_patch_scan: requires a device ID (number).
inputSchema: { type: 'object', required: ['id'], properties: { id: { type: 'number', description: 'Device ID' }, }, }, - src/index.ts:24-24 (registration)Registration via ALL_TOOLS array: deviceTools (which includes ninja_submit_software_patch_scan) is exported from tools/index.ts, imported into src/index.ts, and mapped into toolMap by name for handling.
const toolMap = new Map(ALL_TOOLS.map((def) => [def.tool.name, def.handler])); - src/tools/index.ts:13-14 (registration)ALL_TOOLS aggregated array where deviceTools (containing ninja_submit_software_patch_scan) is spread in.
export const ALL_TOOLS = [ ...deviceTools, - src/tools/types.ts:4-8 (helper)ToolDef interface used to type each tool definition, combining a Tool schema and a handler function.
export interface ToolDef { tool: Tool; // eslint-disable-next-line @typescript-eslint/no-explicit-any handler: (args: any, client: NinjaOneClient) => Promise<unknown>; }