Skip to main content
Glama

ninja_reboot_device

Reboot a device with a graceful restart (NORMAL) or immediate forced restart (FORCED), recording the reason in the activity log.

Instructions

Reboot a device. NORMAL performs a graceful restart; FORCED immediately reboots without waiting for running processes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesDevice ID
modeYesReboot mode: NORMAL (graceful) or FORCED (immediate)
reasonNoReason for the reboot (recorded in activity log)

Implementation Reference

  • The handler function that executes the device reboot. It sends a POST request to `/device/{id}/reboot/{mode}`, optionally including a reason body. The `mode` parameter is passed directly as a URL path segment (NORMAL or FORCED).
    handler: async ({ id, mode, reason }, client: NinjaOneClient) =>
      client.post(`/device/${id}/reboot/${mode}`, reason ? { reason } : undefined),
  • Input schema for the ninja_reboot_device tool. Requires `id` (number, device ID) and `mode` (enum: NORMAL or FORCED). Optional `reason` (string) for the activity log.
    inputSchema: {
      type: 'object',
      required: ['id', 'mode'],
      properties: {
        id: { type: 'number', description: 'Device ID' },
        mode: {
          type: 'string',
          enum: ['NORMAL', 'FORCED'],
          description: 'Reboot mode: NORMAL (graceful) or FORCED (immediate)',
        },
        reason: { type: 'string', description: 'Reason for the reboot (recorded in activity log)' },
      },
    },
  • The tool is registered by being part of the `deviceTools` array (defined in devices.ts), which is spread into `ALL_TOOLS` in src/tools/index.ts. This array is the complete set of MCP tools for the application.
    export const ALL_TOOLS = [
      ...deviceTools,
      ...organizationTools,
      ...alertTools,
      ...activityTools,
      ...ticketingTools,
      ...queryTools,
      ...policyTools,
      ...userTools,
      ...backupTools,
      ...systemTools,
    ];
  • The `deviceTools` array (of type `ToolDef[]`) contains all device-related tool definitions including `ninja_reboot_device` at index/position 377-397.
    export const deviceTools: ToolDef[] = [
  • The `ToolDef` interface defines the structure: a `tool` property containing metadata (name, description, inputSchema) and a `handler` function that receives args and a `NinjaOneClient` instance.
    export interface ToolDef {
      tool: Tool;
      // eslint-disable-next-line @typescript-eslint/no-explicit-any
      handler: (args: any, client: NinjaOneClient) => Promise<unknown>;
    }
Behavior3/5

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

With no annotations, the description carries full burden. It discloses the behavioral difference between NORMAL and FORCED modes (graceful vs immediate). However, it does not mention potential side effects like service disruption, data loss risk, or any prerequisites. Missing details on what happens after the command is issued (e.g., device becomes unavailable).

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?

Description is very concise: two sentences. The first sentence immediately states the purpose, the second adds mode details. No redundant or unnecessary words. Well-structured and efficiently 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?

Description lacks important context such as return value (e.g., success/failure indication), impact on device availability during reboot, required permissions, or any side effects. For a destructive action like reboot, an agent would need more completeness to assess consequences.

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 covers 100% of parameters with descriptions. The description's explanation of NORMAL and FORCED modes largely mirrors the schema enum descriptions. No additional meaning is added for the 'id' or 'reason' parameters beyond what the schema already provides.

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 'Reboot a device' with specific verb and resource. Explains the two modes (NORMAL vs FORCED), making the action unambiguous. Among siblings, no other tool performs reboot, so it is well-differentiated.

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?

No explicit guidance on when to use this tool vs alternatives. The description only explains the mode difference but does not provide context such as when a graceful vs forced reboot is appropriate, or when to avoid using this tool (e.g., if device is critical). Slight improvement possible.

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