Skip to main content
Glama

ninja_query_policy_overrides

Retrieve policy overrides across managed devices with optional filtering and pagination for efficient querying.

Instructions

Query policy overrides across all managed devices.

Input Schema

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

Implementation Reference

  • Handler function that calls GET /queries/policy-overrides with cleaned arguments
      handler: async (args, client: NinjaOneClient) =>
        client.get('/queries/policy-overrides', clean(args)),
    },
  • Input schema defining optional parameters: df (string), pageSize (number), cursor (string)
    inputSchema: {
      type: 'object',
      properties: {
        df: { type: 'string', description: 'Device filter expression' },
        pageSize: { type: 'number', description: 'Max results to return' },
        cursor: { type: 'string', description: 'Pagination cursor' },
      },
    },
  • Tool definition registered within the policyTools array, exported and aggregated into ALL_TOOLS
      {
        tool: {
          name: 'ninja_query_policy_overrides',
          description: 'Query policy overrides across all managed devices.',
          inputSchema: {
            type: 'object',
            properties: {
              df: { type: 'string', description: 'Device filter expression' },
              pageSize: { type: 'number', description: 'Max results to return' },
              cursor: { type: 'string', description: 'Pagination cursor' },
            },
          },
        },
        handler: async (args, client: NinjaOneClient) =>
          client.get('/queries/policy-overrides', clean(args)),
      },
      {
        tool: {
          name: 'ninja_list_node_roles',
          description: 'List all available device/node roles.',
          inputSchema: { type: 'object', properties: {} },
        },
        handler: async (_args, client: NinjaOneClient) => client.get('/roles'),
      },
    ];
  • Helper function that filters out null/undefined/empty values from args before passing as query params
    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 bears full responsibility for behavioral disclosure. It only indicates a read operation (query) but lacks details on pagination behavior, authentication needs, rate limits, or any side effects. This is insufficient for safe invocation.

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 that communicates the primary purpose without unnecessary words. It is appropriately front-loaded.

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 tool has pagination parameters and no output schema, the description should provide context about the return format or how to use pagination. It fails to do so, leaving the agent with incomplete information.

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 three parameters (df, pageSize, cursor), so the schema already explains them. The tool description adds no extra meaning beyond the schema, resulting in a baseline score of 3.

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 tool queries policy overrides across all managed devices, using the verb 'query' and specifying the resource 'policy overrides' with a scope. It distinguishes from sibling tools like 'ninja_get_device_policy_overrides' 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?

No guidance is provided on when to use this tool versus alternatives such as 'ninja_get_device_policy_overrides'. There is no mention of prerequisites, exclusions, or context for use.

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