Skip to main content
Glama

ninja_query_processors

Query CPU and processor details across all managed devices with support for device filters and pagination.

Instructions

Query CPU/processor information across all managed devices.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dfNoDevice filter expression
pageSizeNoMax results to return
cursorNoPagination cursor from previous response

Implementation Reference

  • The tool 'ninja_query_processors' is registered as a query tool in the queryTools array via the queryTool helper function.
    queryTool(
      'ninja_query_processors',
      'Query CPU/processor information across all managed devices.',
      '/queries/processors',
    ),
  • The handler for ninja_query_processors is defined by the queryTool function which creates a handler that calls client.get('/queries/processors', clean(args)).
    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)),
      };
    }
  • The input schema for ninja_query_processors includes base pagination properties (df, pageSize, cursor) inherited from basePaginationProps.
    import { NinjaOneClient } from '../client.js';
    import { clean } from '../utils.js';
    import { ToolDef } from './types.js';
    
    const basePaginationProps = {
      df: { type: 'string', description: 'Device filter expression' },
      pageSize: { type: 'number', description: 'Max results to return' },
      cursor: { type: 'string', description: 'Pagination cursor from previous response' },
    };
  • The ToolDef interface defines the structure for tool definitions with a tool (name, description, inputSchema) and a handler function.
    export interface ToolDef {
      tool: Tool;
      // eslint-disable-next-line @typescript-eslint/no-explicit-any
      handler: (args: any, client: NinjaOneClient) => Promise<unknown>;
    }
  • All queryTools including ninja_query_processors are aggregated into the ALL_TOOLS array for registration with the MCP server.
    import { activityTools } from './activities.js';
    import { alertTools } from './alerts.js';
    import { backupTools } from './backup.js';
    import { deviceTools } from './devices.js';
    import { organizationTools } from './organizations.js';
    import { policyTools } from './policies.js';
    import { queryTools } from './queries.js';
    import { systemTools } from './system.js';
    import { ticketingTools } from './ticketing.js';
    import { userTools } from './users.js';
    export type { ToolDef } from './types.js';
    
    export const ALL_TOOLS = [
      ...deviceTools,
      ...organizationTools,
      ...alertTools,
      ...activityTools,
      ...ticketingTools,
      ...queryTools,
      ...policyTools,
      ...userTools,
      ...backupTools,
      ...systemTools,
    ];
Behavior2/5

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

No annotations are provided, so the description must fully disclose behavioral traits. It only states 'Query', implying read-only, but lacks details on authentication, rate limits, or any side effects. The description is insufficient for an agent to understand the tool's operational impact.

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, concise sentence with no redundant or irrelevant information. Every word adds value, making it easy for an agent to parse quickly.

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 the lack of output schema and annotations, the description is too minimal. It does not explain pagination (cursor), filter expression (df), or the return structure, which are essential for an agent to use the tool effectively.

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 the description does not need to elaborate on parameters. The description does not add any meaning beyond the schema's parameter descriptions, meeting the baseline expectation.

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 'Query', the resource 'CPU/processor information', and the scope 'across all managed devices'. This effectively distinguishes it from sibling tools like ninja_get_device_processors, which target a single device.

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 guidance on when to use this tool versus alternatives (e.g., ninja_get_device_processors), nor does it mention any prerequisites or exclusions. The only hint is 'across all managed devices', but explicit comparison is missing.

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