Skip to main content
Glama

get_device_software

Retrieve installed software inventory for a NinjaOne device to monitor applications and manage device configurations.

Instructions

Get the list of installed software on a specific device.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
device_idYesNinjaOne device ID

Implementation Reference

  • Handler function that executes the get_device_software tool logic. It calls the NinjaOne API endpoint /device/{device_id}/software and returns the installed software list as JSON.
    async ({ device_id }) => {
      try {
        const result = await client.get(`/device/${device_id}/software`);
        return toolResult(JSON.stringify(result, null, 2));
      } catch (error) {
        return toolResult(
          `Error fetching device software: ${error}`,
          true,
        );
      }
    },
  • Input schema definition using Zod. Defines a required device_id parameter (number) to identify which device's software to retrieve.
    {
      device_id: z.number().describe("NinjaOne device ID"),
    },
  • Tool registration using server.tool() which registers the 'get_device_software' tool with its name, description, schema, and handler function.
    server.tool(
      "get_device_software",
      "Get the list of installed software on a specific device.",
      {
        device_id: z.number().describe("NinjaOne device ID"),
      },
      async ({ device_id }) => {
        try {
          const result = await client.get(`/device/${device_id}/software`);
          return toolResult(JSON.stringify(result, null, 2));
        } catch (error) {
          return toolResult(
            `Error fetching device software: ${error}`,
            true,
          );
        }
      },
    );
  • Helper function toolResult() that formats the response content for MCP tools, creating a standardized text response with optional error flag.
    function toolResult(text: string, isError = false) {
      return { content: [{ type: "text" as const, text }], isError };
    }
  • NinjaOneClient.get() method used by the handler to make authenticated API calls to the NinjaOne REST API endpoints.
    async get(
      path: string,
      params?: Record<string, string>,
    ): Promise<unknown> {
      return this.request("GET", path, undefined, params);
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool retrieves a list, implying a read-only operation, but doesn't cover important aspects like authentication requirements, rate limits, error conditions, or the format/structure of the returned list. This leaves significant gaps for an agent to understand how to use it effectively.

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's appropriately sized and front-loaded, making it easy to parse quickly.

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 moderate complexity (single parameter, read operation) and lack of annotations or output schema, the description is minimally adequate. It explains what the tool does but lacks details on behavior, usage context, and output format, which would be helpful for an agent to invoke it correctly.

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?

The schema description coverage is 100%, with the single parameter 'device_id' fully documented as 'NinjaOne device ID'. The description adds no additional parameter semantics beyond what the schema provides, such as format examples or constraints. With high schema coverage, the baseline score of 3 is appropriate.

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 ('list of installed software on a specific device'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_device' or 'get_device_os_patch_status', which also retrieve device-specific information but for different data types.

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. It doesn't mention prerequisites (e.g., needing a valid device ID), exclusions, or comparisons to similar tools like 'get_device' (for general device info) or 'get_device_activities' (for activity logs).

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