Skip to main content
Glama

get_device_disks

Retrieve disk and storage details for a NinjaOne device, including capacity and free space, to monitor storage usage and manage device resources.

Instructions

Get disk/storage information for a specific device, including capacity and free space.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
device_idYesNinjaOne device ID

Implementation Reference

  • Handler function for get_device_disks tool. Takes device_id as input, makes a GET request to /device/${device_id}/disks endpoint via the NinjaOne client, and returns the disk information as JSON or an error message.
      async ({ device_id }) => {
        try {
          const result = await client.get(`/device/${device_id}/disks`);
          return toolResult(JSON.stringify(result, null, 2));
        } catch (error) {
          return toolResult(
            `Error fetching disk info: ${error}`,
            true,
          );
        }
      },
    );
  • Input schema definition for get_device_disks tool using Zod. Validates that device_id is a required number parameter with a description.
    {
      device_id: z.number().describe("NinjaOne device ID"),
    },
  • Complete registration of get_device_disks tool with MCP server. Includes tool name, description, input schema, and handler function.
    server.tool(
      "get_device_disks",
      "Get disk/storage information for a specific device, including capacity and free space.",
      {
        device_id: z.number().describe("NinjaOne device ID"),
      },
      async ({ device_id }) => {
        try {
          const result = await client.get(`/device/${device_id}/disks`);
          return toolResult(JSON.stringify(result, null, 2));
        } catch (error) {
          return toolResult(
            `Error fetching disk info: ${error}`,
            true,
          );
        }
      },
    );
  • Helper utility function that creates a properly formatted MCP tool result object with text content and optional error flag.
    function toolResult(text: string, isError = false) {
      return { content: [{ type: "text" as const, text }], isError };
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states it 'gets' information, implying a read-only operation, but doesn't disclose behavioral traits such as permissions needed, rate limits, error conditions, or what the output format looks like. This is inadequate for a tool with no annotation coverage.

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, efficient sentence that directly states the tool's purpose without unnecessary words. It is front-loaded and every part earns its place, making it highly concise and well-structured.

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 no annotations and no output schema, the description is incomplete. It lacks details on behavioral aspects (e.g., response format, errors) and doesn't compensate for the missing structured data. For a tool that retrieves device-specific data, this leaves significant gaps for an agent.

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 the single parameter 'device_id' documented as 'NinjaOne device ID'. The description adds no additional meaning beyond this, such as examples or context for the device ID. Baseline 3 is appropriate since the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Get') and resource ('disk/storage information for a specific device'), specifying what data is retrieved (capacity and free space). It does not explicitly differentiate from sibling tools like 'get_device' or 'get_device_processor_info', which reduces it from a 5.

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 is provided on when to use this tool versus alternatives. For example, it doesn't mention if this is for monitoring storage or troubleshooting, or how it differs from other 'get_device_*' tools in the sibling list. This leaves the agent without context for selection.

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/fredriksknese/mcp-ninjaone'

If you have feedback or need assistance with the MCP directory API, please join our Discord server