Skip to main content
Glama

ninja_get_device_installed_os_patches

Retrieve OS patch installation history for a specified device, filtering by status or date range.

Instructions

Get OS patch install history for a device.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesDevice ID
statusNoFilter by install status
installedBeforeNoFilter patches installed before this date
installedAfterNoFilter patches installed after this date

Implementation Reference

  • The handler function for 'ninja_get_device_installed_os_patches' makes a GET request to /device/{id}/os-patch-installs with optional query parameters (status, installedBefore, installedAfter) filtered via the clean() utility.
    handler: async ({ id, ...params }, client: NinjaOneClient) =>
      client.get(`/device/${id}/os-patch-installs`, clean(params)),
  • Input schema for 'ninja_get_device_installed_os_patches'. Requires device ID (number); optional filters: status, installedBefore, installedAfter (all strings).
    inputSchema: {
      type: 'object',
      required: ['id'],
      properties: {
        id: { type: 'number', description: 'Device ID' },
        status: { type: 'string', description: 'Filter by install status' },
        installedBefore: { type: 'string', description: 'Filter patches installed before this date' },
        installedAfter: { type: 'string', description: 'Filter patches installed after this date' },
      },
    },
  • Tool registration within the deviceTools array: defines name, description, input schema, and handler. Exported via deviceTools, aggregated in ALL_TOOLS, and registered via ListToolsRequestSchema/CallToolRequestSchema handlers in src/index.ts.
    {
      tool: {
        name: 'ninja_get_device_installed_os_patches',
        description: 'Get OS patch install history for a device.',
        inputSchema: {
          type: 'object',
          required: ['id'],
          properties: {
            id: { type: 'number', description: 'Device ID' },
            status: { type: 'string', description: 'Filter by install status' },
            installedBefore: { type: 'string', description: 'Filter patches installed before this date' },
            installedAfter: { type: 'string', description: 'Filter patches installed after this date' },
          },
        },
      },
      handler: async ({ id, ...params }, client: NinjaOneClient) =>
        client.get(`/device/${id}/os-patch-installs`, clean(params)),
    },
  • The clean() helper filters out null/undefined/empty-string values from the query parameters object before passing to the API request.
    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?

With no annotations, the description should disclose behavior like read-only, pagination, or return limits. It merely says 'get history' without any operational traits.

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

Conciseness4/5

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

The description is a single sentence with no fluff, but could benefit from additional structuring to highlight key features or differentiate from siblings.

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?

Given 4 parameters, no output schema, and many sibling tools, the description lacks details about return format, pagination, and what 'install history' entails, making it incomplete.

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 coverage is 100%, so baseline is 3. The description adds no extra meaning beyond the schema fields (e.g., date format expectations or interaction of filters).

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

Purpose3/5

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

The description states it gets install history, but does not differentiate from sibling tools like ninja_get_device_os_patches or ninja_query_installed_os_patches, leading to potential confusion about the exact payload.

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 is provided on when to use this tool versus alternatives (e.g., query vs get, or patch apply vs history). No exclusions or context are mentioned.

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