Skip to main content
Glama

ninja_query_software_patches

Query pending, failed, or rejected software patches across managed devices to track update status and resolve issues.

Instructions

Query pending, failed, or rejected software patches across all managed devices.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dfNoDevice filter expression
pageSizeNoMax results to return
cursorNoPagination cursor from previous response
statusNoFilter by patch status
productIdentifierNoFilter by software product identifier
impactNoFilter by impact level
typeNoFilter by patch type

Implementation Reference

  • The queryTool factory function generates the handler for ninja_query_software_patches. The handler calls client.get('/queries/software-patches', clean(args)), passing filtered arguments.
    function queryTool(
      name: string,
      description: string,
      path: string,
      extraProps: Record<string, unknown> = {},
    ): ToolDef {
      return {
        tool: {
          name,
          description,
          inputSchema: {
            type: 'object',
            properties: { ...basePaginationProps, ...extraProps },
          },
        },
        handler: async (args, client: NinjaOneClient) => client.get(path, clean(args)),
      };
  • Input schema definition for ninja_query_software_patches. Defines the tool name, description ('Query pending, failed, or rejected software patches across all managed devices.'), API path '/queries/software-patches', and input properties: status, productIdentifier, impact, type plus inherited pagination props (df, pageSize, cursor).
    queryTool(
      'ninja_query_software_patches',
      'Query pending, failed, or rejected software patches across all managed devices.',
      '/queries/software-patches',
      {
        status: { type: 'string', description: 'Filter by patch status' },
        productIdentifier: { type: 'string', description: 'Filter by software product identifier' },
        impact: { type: 'string', description: 'Filter by impact level' },
        type: { type: 'string', description: 'Filter by patch type' },
      },
    ),
  • The tool is registered in the ALL_TOOLS array via the spread of queryTools (line 19), which is then used to build the toolMap and list tools in the MCP server (src/index.ts lines 24, 32).
    export const ALL_TOOLS = [
      ...deviceTools,
      ...organizationTools,
      ...alertTools,
      ...activityTools,
      ...ticketingTools,
      ...queryTools,
      ...policyTools,
      ...userTools,
      ...backupTools,
      ...systemTools,
    ];
  • The queryTool factory function (lines 11-28) generates both the schema and handler for all query tools, including ninja_query_software_patches. It wraps NinjaOneClient.get() with clean() argument filtering.
    function queryTool(
      name: string,
      description: string,
      path: string,
      extraProps: Record<string, unknown> = {},
    ): ToolDef {
      return {
        tool: {
          name,
          description,
          inputSchema: {
            type: 'object',
            properties: { ...basePaginationProps, ...extraProps },
          },
        },
        handler: async (args, client: NinjaOneClient) => client.get(path, clean(args)),
      };
Behavior2/5

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

No annotations provided; description only states 'Query' implying read-only, but does not disclose pagination behavior, performance implications, or rate limits. Fails to add behavioral context beyond the schema.

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?

Single, clear sentence with no wasted words, but lacks structured presentation (e.g., bullets) and front-loading of key info.

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 exists, and description does not hint at return format or behavior when no filters applied. Parameters are well-documented in schema, but overall completeness is average.

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?

Schema coverage is 100%, so description's value added beyond schema is minimal. Description does not elaborate on parameter semantics beyond the resource type.

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?

Description uses specific verb 'Query' and resource 'pending, failed, or rejected software patches' with scope 'across all managed devices', clearly distinguishing it from device-specific patch tools.

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?

Description implies usage for aggregated view, but does not explicitly state when to use this tool over siblings like ninja_get_device_software_patches or ninja_query_os_patches. No when-not or alternatives provided.

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