Skip to main content
Glama

ninja_get_device

Retrieve full device details by ID. Access comprehensive device information for monitoring and management.

Instructions

Get full details for a single device by ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesDevice ID

Implementation Reference

  • The handler function for 'ninja_get_device'. It receives { id } from arguments and calls client.get(`/device/${id}`) to fetch full device details from the NinjaOne API.
    {
      tool: {
        name: 'ninja_get_device',
        description: 'Get full details for a single device by ID.',
        inputSchema: {
          type: 'object',
          required: ['id'],
          properties: {
            id: { type: 'number', description: 'Device ID' },
          },
        },
      },
      handler: async ({ id }, client: NinjaOneClient) => client.get(`/device/${id}`),
  • Input schema for 'ninja_get_device'. Defines a required 'id' parameter (number) for specifying which device to retrieve.
    inputSchema: {
      type: 'object',
      required: ['id'],
      properties: {
        id: { type: 'number', description: 'Device ID' },
      },
    },
  • src/index.ts:23-24 (registration)
    The tool is registered at server startup: ALL_TOOLS (which includes deviceTools) are mapped by name to handlers in a toolMap, then exposed via ListToolsRequestSchema and dispatched via CallToolRequestSchema.
    const ninjaClient = new NinjaOneClient(NINJA_BASE_URL, NINJA_CLIENT_ID, NINJA_CLIENT_SECRET);
    const toolMap = new Map(ALL_TOOLS.map((def) => [def.tool.name, def.handler]));
  • deviceTools is exported from devices.ts and included in the ALL_TOOLS array, which is consumed by index.ts for registration with the MCP server.
    export const ALL_TOOLS = [
      ...deviceTools,
      ...organizationTools,
      ...alertTools,
      ...activityTools,
      ...ticketingTools,
      ...queryTools,
      ...policyTools,
      ...userTools,
      ...backupTools,
      ...systemTools,
    ];
  • The 'clean' utility function used by some other tool handlers, but not used by 'ninja_get_device' handler (which directly passes { id } to client.get). Included for completeness of tool infrastructure.
    export function clean(args: Record<string, any>): Record<string, unknown> {
      return Object.fromEntries(
        Object.entries(args).filter(([, v]) => v != null && v !== ''),
      );
    }
Behavior3/5

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

No annotations provided, so description carries full burden. 'Full details' is vague; lacks specifics on what is included (e.g., all device fields?). Adequate for a simple get-by-ID but could be more transparent.

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?

One sentence, front-loaded, no unnecessary words. Efficient and clear.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple get-by-ID tool with one parameter, the description is mostly complete. No output schema, but the purpose is clear. Could mention return value briefly.

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 a single 'id' parameter. Description only mentions 'by ID' but does not add extra meaning beyond the schema. Baseline 3 applies as schema does the heavy lifting.

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?

Clearly specifies 'Get full details for a single device by ID' – verb, resource, scope, and method. Distinguishes from siblings that list devices or get specific attributes.

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 from name and description that it's for retrieving a single device's full details, but no explicit guidance on when to use vs. alternatives like ninja_get_devices_detailed or ninja_search_devices.

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