Skip to main content
Glama

ninja_get_device_software_patches

Retrieve pending, failed, or rejected software patches for a specific device using its ID. Optionally filter by status, product, type, or impact.

Instructions

Get pending, failed, or rejected software patches for a device.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesDevice ID
statusNoFilter by status
productIdentifierNoFilter by software product identifier
typeNoFilter by patch type
impactNoFilter by impact level

Implementation Reference

  • Tool definition and handler for ninja_get_device_software_patches. The handler extracts the 'id' from arguments (destructured as {id,...params}) and calls client.get with the path `/device/${id}/software-patches` after cleaning null/empty params.
    {
      tool: {
        name: 'ninja_get_device_software_patches',
        description: 'Get pending, failed, or rejected software patches for a device.',
        inputSchema: {
          type: 'object',
          required: ['id'],
          properties: {
            id: { type: 'number', description: 'Device ID' },
            status: { type: 'string', description: 'Filter by status' },
            productIdentifier: { type: 'string', description: 'Filter by software product identifier' },
            type: { type: 'string', description: 'Filter by patch type' },
            impact: { type: 'string', description: 'Filter by impact level' },
          },
        },
      },
      handler: async ({ id, ...params }, client: NinjaOneClient) =>
        client.get(`/device/${id}/software-patches`, clean(params)),
    },
  • Input schema for ninja_get_device_software_patches. Requires 'id' (number). Optional filters: status, productIdentifier, type, impact (all strings).
    inputSchema: {
      type: 'object',
      required: ['id'],
      properties: {
        id: { type: 'number', description: 'Device ID' },
        status: { type: 'string', description: 'Filter by status' },
        productIdentifier: { type: 'string', description: 'Filter by software product identifier' },
        type: { type: 'string', description: 'Filter by patch type' },
        impact: { type: 'string', description: 'Filter by impact level' },
      },
    },
  • The tool is registered as part of deviceTools (exported from devices.ts) which is spread into ALL_TOOLS array for registration with MCP.
    export const ALL_TOOLS = [
      ...deviceTools,
      ...organizationTools,
      ...alertTools,
      ...activityTools,
      ...ticketingTools,
      ...queryTools,
      ...policyTools,
      ...userTools,
      ...backupTools,
      ...systemTools,
    ];
  • deviceTools is exported as an array of ToolDef objects. The ninja_get_device_software_patches tool is one of the entries in this array.
    export const deviceTools: ToolDef[] = [
  • The 'clean' utility function used by the handler. It filters out null/empty values from the params object before passing them as query parameters.
    // eslint-disable-next-line @typescript-eslint/no-explicit-any
    export function clean(args: Record<string, any>): Record<string, unknown> {
      return Object.fromEntries(
        Object.entries(args).filter(([, v]) => v != null && v !== ''),
      );
    }
Behavior2/5

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

No annotations are provided, so the description must carry the full burden. It indicates a read operation ('Get') but does not disclose any behavioral traits such as auth requirements, rate limits, or whether it modifies state. The description is minimal and lacks transparency beyond the basic action.

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?

A single, concise sentence that directly states the tool's purpose. No extraneous information, front-loaded with the action and resource.

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?

No output schema is provided, and the description does not hint at return fields or data structure. While the input schema is fully documented, the lack of output information and usage differentiation leaves the agent partially uninformed.

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 input schema has 100% description coverage for all 5 parameters. The description mentions statuses like 'pending', 'failed', or 'rejected', but does not add meaning beyond the schema's descriptions. It does not clarify allowed values or add constraints.

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 verb (Get), resource (software patches for a device), and scope (pending, failed, or rejected). It effectively distinguishes from sibling tools like ninja_get_device_installed_software_patches which retrieves installed patches.

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?

No guidance on when to use this tool versus alternatives (e.g., ninja_get_device_installed_software_patches, ninja_submit_software_patch_apply). The description does not provide context for appropriate usage or when not to use it.

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