Skip to main content
Glama

ninja_update_device

Update device attributes including display name, location, role, policy, and organization assignment.

Instructions

Update device settings such as display name, location, role, or policy.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesDevice ID
displayNameNoDevice display name
locationIdNoLocation ID to assign
nodeRoleIdNoNode role ID to assign
policyIdNoPolicy ID to assign
organizationIdNoOrganization ID to move device to

Implementation Reference

  • Input schema for ninja_update_device tool: defines required id and optional fields for updating device settings (displayName, locationId, nodeRoleId, policyId, organizationId).
    inputSchema: {
      type: 'object',
      required: ['id'],
      properties: {
        id: { type: 'number', description: 'Device ID' },
        displayName: { type: 'string', description: 'Device display name' },
        locationId: { type: 'number', description: 'Location ID to assign' },
        nodeRoleId: { type: 'number', description: 'Node role ID to assign' },
        policyId: { type: 'number', description: 'Policy ID to assign' },
        organizationId: { type: 'number', description: 'Organization ID to move device to' },
      },
    },
  • Handler for ninja_update_device: extracts id from args, sends PATCH request to /device/{id} with remaining fields as the request body.
    handler: async ({ id, ...body }, client: NinjaOneClient) => client.patch(`/device/${id}`, body),
  • The tool definition and handler are registered as an element in the deviceTools array, which is exported and aggregated into ALL_TOOLS in src/tools/index.ts.
    {
      tool: {
        name: 'ninja_update_device',
        description: 'Update device settings such as display name, location, role, or policy.',
        inputSchema: {
          type: 'object',
          required: ['id'],
          properties: {
            id: { type: 'number', description: 'Device ID' },
            displayName: { type: 'string', description: 'Device display name' },
            locationId: { type: 'number', description: 'Location ID to assign' },
            nodeRoleId: { type: 'number', description: 'Node role ID to assign' },
            policyId: { type: 'number', description: 'Policy ID to assign' },
            organizationId: { type: 'number', description: 'Organization ID to move device to' },
          },
        },
      },
      handler: async ({ id, ...body }, client: NinjaOneClient) => client.patch(`/device/${id}`, body),
    },
Behavior2/5

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

No annotations provided, so description must disclose behavioral traits. It says 'update' but doesn't clarify if update is destructive, requires permissions, or triggers side effects. Lacks important safety info.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One sentence, no filler. Front-loaded with verb and resource. Could be slightly more informative without becoming verbose.

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?

No output schema. Description lacks info on return values, idempotency, or error handling. For a mutation tool with 6 parameters, more context is needed to complete the picture.

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?

Input schema has 100% coverage with descriptions for all 6 parameters. Description adds no additional meaning beyond listing a subset; schema already handles semantics.

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 clearly states it updates device settings with specific examples (display name, location, role, policy). Distinguishes from read/list siblings and other actions like reboot or run script.

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 on when to use this tool versus alternatives like ninja_update_device_custom_fields or ninja_reboot_device. Implicit usage from name, but no explicit context.

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