Skip to main content
Glama

ninja_get_device_network_interfaces

Get network interface details (IP addresses, MAC addresses, adapter type) for a device by providing its ID.

Instructions

Get network interface information for a device (IP addresses, MAC addresses, adapter type).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesDevice ID

Implementation Reference

  • The handler function that executes the tool logic - makes a GET request to /device/{id}/network-interfaces
    handler: async ({ id }, client: NinjaOneClient) => client.get(`/device/${id}/network-interfaces`),
  • Tool definition with schema - defines the tool name, description, and input validation schema requiring a device ID
    {
      tool: {
        name: 'ninja_get_device_network_interfaces',
        description: 'Get network interface information for a device (IP addresses, MAC addresses, adapter type).',
        inputSchema: {
          type: 'object',
          required: ['id'],
          properties: {
            id: { type: 'number', description: 'Device ID' },
          },
        },
      },
  • Registration of all tool definitions including deviceTools which contains the network interfaces tool
    export const ALL_TOOLS = [
      ...deviceTools,
      ...organizationTools,
      ...alertTools,
      ...activityTools,
      ...ticketingTools,
      ...queryTools,
      ...policyTools,
      ...userTools,
      ...backupTools,
      ...systemTools,
    ];
  • src/index.ts:24-33 (registration)
    MCP server registration - builds a tool map from ALL_TOOLS and registers ListToolsRequestSchema and CallToolRequestSchema handlers
    const toolMap = new Map(ALL_TOOLS.map((def) => [def.tool.name, def.handler]));
    
    const server = new Server(
      { name: 'ninjaone-mcp', version: '1.0.0' },
      { capabilities: { tools: {} } },
    );
    
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: ALL_TOOLS.map((def) => def.tool),
    }));
  • ToolDef interface used to type the tool definition objects, ensuring each tool has a 'tool' schema and a 'handler' function
    export interface ToolDef {
      tool: Tool;
      // eslint-disable-next-line @typescript-eslint/no-explicit-any
      handler: (args: any, client: NinjaOneClient) => Promise<unknown>;
    }
Behavior2/5

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

No annotations are present, so the description must carry the full burden. It does not mention any required permissions, error conditions, or limitations (e.g., what happens for invalid device IDs). The description is merely a basic summary.

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, clear sentence with no extraneous words. It immediately conveys the purpose and expected output, fitting the tool's simplicity.

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?

While the description lists return fields, it omits details on output format, pagination, or error handling. The absence of output schema increases the need for more context. The description is adequate but not complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% coverage with a single parameter 'id' described as 'Device ID'. The description adds value by specifying what network interface information is returned (IP, MAC, adapter type), enriching the schema 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?

The description clearly specifies the action ('Get') and resource ('network interface information for a device'), and explicitly lists the types of data returned (IP, MAC, adapter type). This distinguishes it from generic device retrieval or other query tools.

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 like ninja_query_network_interfaces or ninja_get_device. The context signals show a sibling tool with similar purpose, so explicit differentiation would help.

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