Skip to main content
Glama

ninja_submit_os_patch_scan

Initiate an OS patch scan on a device to refresh its pending patch list.

Instructions

Trigger an OS patch scan on a device to refresh its pending patch list.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesDevice ID

Implementation Reference

  • The handler function for ninja_submit_os_patch_scan. It accepts { id } (device ID) and sends a POST to /device/{id}/patch/os/scan via the NinjaOne client.
    {
      tool: {
        name: 'ninja_submit_os_patch_scan',
        description: 'Trigger an OS patch scan on a device to refresh its pending patch list.',
        inputSchema: {
          type: 'object',
          required: ['id'],
          properties: {
            id: { type: 'number', description: 'Device ID' },
          },
        },
      },
      handler: async ({ id }, client: NinjaOneClient) =>
        client.post(`/device/${id}/patch/os/scan`),
    },
  • The input schema for ninja_submit_os_patch_scan requires an 'id' (number) property representing the Device ID, with no other parameters.
    {
      tool: {
        name: 'ninja_submit_os_patch_scan',
        description: 'Trigger an OS patch scan on a device to refresh its pending patch list.',
        inputSchema: {
          type: 'object',
          required: ['id'],
          properties: {
            id: { type: 'number', description: 'Device ID' },
          },
        },
      },
      handler: async ({ id }, client: NinjaOneClient) =>
        client.post(`/device/${id}/patch/os/scan`),
    },
  • The tool is defined as part of the deviceTools array (ToolDef[]) which is exported from src/tools/devices.ts.
    export const deviceTools: ToolDef[] = [
  • ALL_TOOLS aggregates all tool arrays including deviceTools, which contains ninja_submit_os_patch_scan, for registration with the MCP server.
    export const ALL_TOOLS = [
      ...deviceTools,
      ...organizationTools,
      ...alertTools,
      ...activityTools,
      ...ticketingTools,
      ...queryTools,
      ...policyTools,
      ...userTools,
      ...backupTools,
      ...systemTools,
    ];
  • The ToolDef interface defines the shape of each tool: a 'tool' (Tool spec from MCP SDK) and a 'handler' function that takes args and a NinjaOneClient.
    export interface ToolDef {
      tool: Tool;
      // eslint-disable-next-line @typescript-eslint/no-explicit-any
      handler: (args: any, client: NinjaOneClient) => Promise<unknown>;
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, and the description offers minimal behavioral context. It does not disclose whether the scan is asynchronous, if it has side effects, or any required permissions. The mutation nature ('trigger') implies change, but no details on idempotency or potential issues are given.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence that conveys essential information without redundancy. Every word contributes to understanding the tool's function.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has one required parameter and no output schema. The description covers the basic operation and purpose but omits details about return values, synchronization, error conditions, or dependencies. For a trigger action, it is adequate but has noticeable gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The single parameter 'id' is fully described in the schema as 'Device ID', achieving 100% schema coverage. The description does not add further meaning about the parameter's format, constraints, or usage, so it meets the baseline expectation without enhancement.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Trigger an OS patch scan'), the target ('on a device'), and the purpose ('to refresh its pending patch list'). It effectively distinguishes the tool from siblings like 'ninja_submit_os_patch_apply' and 'ninja_submit_software_patch_scan' by specifying the scan type and resource.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no explicit guidance on when to use this tool versus alternatives. While siblings exist for applying patches or scanning software patches, no comparative context or prerequisites are mentioned, leaving the agent to infer usage without clear direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Allied-Business-Solutions/ninjaone-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server