Skip to main content
Glama

ninja_get_group_device_ids

Retrieve the IDs of all devices within a specified group for efficient device management and querying.

Instructions

Get the IDs of all devices in a specific group.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesGroup ID

Implementation Reference

  • The handler function that executes 'ninja_get_group_device_ids' logic — calls GET /group/{id}/device-ids via the NinjaOneClient.
    {
      tool: {
        name: 'ninja_get_group_device_ids',
        description: 'Get the IDs of all devices in a specific group.',
        inputSchema: {
          type: 'object',
          required: ['id'],
          properties: {
            id: { type: 'number', description: 'Group ID' },
          },
        },
      },
      handler: async ({ id }, client: NinjaOneClient) =>
        client.get(`/group/${id}/device-ids`),
    },
  • Input schema for the tool: requires a numeric 'id' (group ID).
    {
      tool: {
        name: 'ninja_get_group_device_ids',
        description: 'Get the IDs of all devices in a specific group.',
        inputSchema: {
          type: 'object',
          required: ['id'],
          properties: {
            id: { type: 'number', description: 'Group ID' },
          },
        },
      },
      handler: async ({ id }, client: NinjaOneClient) =>
        client.get(`/group/${id}/device-ids`),
    },
  • The tool 'ninja_get_group_device_ids' is registered as part of the systemTools array in src/tools/system.ts.
    {
      tool: {
        name: 'ninja_get_group_device_ids',
        description: 'Get the IDs of all devices in a specific group.',
        inputSchema: {
          type: 'object',
          required: ['id'],
          properties: {
            id: { type: 'number', description: 'Group ID' },
          },
        },
      },
      handler: async ({ id }, client: NinjaOneClient) =>
        client.get(`/group/${id}/device-ids`),
    },
  • systemTools (including ninja_get_group_device_ids) are re-exported via ALL_TOOLS array.
    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,
    ];
  • src/index.ts:24-24 (registration)
    All tools including ninja_get_group_device_ids are registered into a Map by name for lookup in the MCP server request handler.
    const toolMap = new Map(ALL_TOOLS.map((def) => [def.tool.name, def.handler]));
Behavior2/5

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

No annotations are provided, so the description carries full burden. It does not disclose behavioral traits like return format, error handling, rate limits, or whether the group must exist. Only the basic purpose is stated.

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 sentence of 10 words, perfectly front-loaded and free of unnecessary text. Every word earns its place.

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?

Given the tool's simplicity (single parameter, read-only), the description is minimally adequate. However, it lacks detail on return type (e.g., array of IDs) and error conditions, leaving some ambiguity.

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 description coverage is 100% with one parameter 'id' described as 'Group ID'. The description adds little beyond this, merely confirming the group context. Baseline of 3 is appropriate.

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 verb ('Get'), resource ('IDs of all devices'), and context ('in a specific group'). It effectively distinguishes from sibling tools like ninja_list_devices or ninja_search_devices by specifying the group context.

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 such as ninja_list_devices or ninja_search_devices. No explicit context or exclusions are given.

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