Skip to main content
Glama

ninja_submit_software_patch_apply

Apply software patches to a device by specifying patch IDs or apply all approved pending patches.

Instructions

Apply software patches on a device. Omit patchIds to apply all approved pending patches.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesDevice ID
patchIdsNoSpecific patch IDs to apply (omit to apply all approved pending patches)

Implementation Reference

  • The handler function for 'ninja_submit_software_patch_apply' which calls client.post(`/device/${id}/patch/software/apply`, patchIds ? { patchIds } : undefined) to apply software patches on a device.
    tool: {
      name: 'ninja_submit_software_patch_apply',
      description: 'Apply software patches on a device. Omit patchIds to apply all approved pending patches.',
      inputSchema: {
        type: 'object',
        required: ['id'],
        properties: {
          id: { type: 'number', description: 'Device ID' },
          patchIds: {
            type: 'array',
            items: { type: 'number' },
            description: 'Specific patch IDs to apply (omit to apply all approved pending patches)',
          },
        },
      },
    },
    handler: async ({ id, patchIds }, client: NinjaOneClient) =>
      client.post(`/device/${id}/patch/software/apply`, patchIds ? { patchIds } : undefined),
  • The input schema for 'ninja_submit_software_patch_apply' tool, defining 'id' (required number) and 'patchIds' (optional array of numbers).
    {
      tool: {
        name: 'ninja_submit_software_patch_apply',
        description: 'Apply software patches on a device. Omit patchIds to apply all approved pending patches.',
        inputSchema: {
          type: 'object',
          required: ['id'],
          properties: {
            id: { type: 'number', description: 'Device ID' },
            patchIds: {
              type: 'array',
              items: { type: 'number' },
              description: 'Specific patch IDs to apply (omit to apply all approved pending patches)',
            },
          },
        },
      },
  • The ALL_TOOLS array where deviceTools (containing the tool definition) is spread into the global tool list and exported.
    export const ALL_TOOLS = [
      ...deviceTools,
      ...organizationTools,
      ...alertTools,
      ...activityTools,
      ...ticketingTools,
      ...queryTools,
      ...policyTools,
      ...userTools,
      ...backupTools,
      ...systemTools,
    ];
  • src/index.ts:24-24 (registration)
    The toolMap created from ALL_TOOLS, mapping each tool name to its handler for runtime dispatch.
    const toolMap = new Map(ALL_TOOLS.map((def) => [def.tool.name, def.handler]));
  • The ToolDef interface and type that all tool definitions (including ninja_submit_software_patch_apply) conform to.
    import { Tool } from '@modelcontextprotocol/sdk/types.js';
    import { NinjaOneClient } from '../client.js';
    
    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 only states the basic action. It does not disclose potential side effects (e.g., device reboot, patch failure), required device state, or authorization needs. The description carries the full burden but offers little beyond the obvious.

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 two sentences with no filler. It front-loads the purpose and adds one usage hint. Every word earns its place.

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

Completeness2/5

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

For a mutation tool with no output schema and no annotations, the description lacks context on return values, error conditions, or what happens after applying patches (e.g., device restart). It does not mention prerequisites like device online status or patch approval. This is a significant gap.

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?

Input schema has 100% description coverage: both 'id' and 'patchIds' are documented. The description repeats the schema's note about omitting patchIds. Since schema already explains parameters, the description adds no new meaning. Baseline 3 is appropriate.

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 ('apply software patches') and the resource ('on a device'). It distinguishes from siblings like ninja_submit_os_patch_apply (OS patches) and ninja_submit_software_patch_scan (scan action). The verb 'apply' and resource 'software patches' are specific.

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

Usage Guidelines3/5

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

The description includes a usage hint: 'Omit patchIds to apply all approved pending patches.' However, it does not provide when-to-use vs alternatives, nor any prerequisites or exclusions. The guidance is minimal but not misleading.

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