Skip to main content
Glama

ninja_get_devices_detailed

Fetch all devices with detailed data, custom fields, and policy assignments. Use filters and pagination to control results.

Instructions

List all devices with detailed information including custom fields and policy assignments.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dfNoDevice filter expression
pageSizeNoMax devices to return
afterNoLast device ID for pagination cursor

Implementation Reference

  • Handler function for 'ninja_get_devices_detailed' that makes a GET request to '/devices-detailed' endpoint with cleaned query parameters.
      handler: async (args, client: NinjaOneClient) => client.get('/devices-detailed', clean(args)),
    },
  • Input schema definition for 'ninja_get_devices_detailed' accepting optional 'df', 'pageSize', and 'after' parameters.
    inputSchema: {
      type: 'object',
      properties: {
        df: { type: 'string', description: 'Device filter expression' },
        pageSize: { type: 'number', description: 'Max devices to return' },
        after: { type: 'number', description: 'Last device ID for pagination cursor' },
      },
    },
  • Tool registration object in deviceTools array, which is exported and included in ALL_TOOLS via src/tools/index.ts.
    {
      tool: {
        name: 'ninja_get_devices_detailed',
        description: 'List all devices with detailed information including custom fields and policy assignments.',
        inputSchema: {
          type: 'object',
          properties: {
            df: { type: 'string', description: 'Device filter expression' },
            pageSize: { type: 'number', description: 'Max devices to return' },
            after: { type: 'number', description: 'Last device ID for pagination cursor' },
          },
        },
      },
      handler: async (args, client: NinjaOneClient) => client.get('/devices-detailed', clean(args)),
    },
  • Helper utility 'clean' that filters out null/undefined/empty values from query parameter objects before sending 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?

No annotations provided, so description must carry burden. Omits pagination behavior (pageSize, after parameters) and does not state read-only nature or authentication requirements. Only mentions output includes custom fields and policy assignments.

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?

Single sentence, 12 words, front-loaded with verb and resource. No superfluous language, efficiently conveys core purpose.

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 3 optional parameters, no output schema, and many siblings, the description is too brief. Missing pagination details, filtering semantics (df), and any mention of potential large result sets or output format. Incomplete for effective use.

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% with standard descriptions. Description adds no additional parameter semantics beyond listing included output fields, which is relevant but not param-specific. Baseline 3 applies.

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 verb 'List' and specifies 'devices with detailed information including custom fields and policy assignments', clearly distinguishing it from siblings like 'ninja_list_devices' (likely simpler) and 'ninja_search_devices' (search-focused).

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?

Implied usage as a more detailed alternative to 'ninja_list_devices', but no explicit guidance on when to choose this tool versus others, nor any prerequisites or limitations 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