ninja_query_network_interfaces
Retrieve IP, MAC, and adapter details from network interfaces across all devices, with filtering and pagination support.
Instructions
Query network interface information (IPs, MACs, adapters) across all devices.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| df | No | Device filter expression | |
| pageSize | No | Max results to return | |
| cursor | No | Pagination cursor from previous response |
Implementation Reference
- src/tools/queries.ts:26-27 (handler)Handler lambda that executes the tool logic by calling client.get() with the path '/queries/network-interfaces' and cleaned args.
handler: async (args, client: NinjaOneClient) => client.get(path, clean(args)), }; - src/tools/queries.ts:21-24 (schema)Input schema for the tool — accepts df, pageSize, and cursor (base pagination props) with no extra properties.
inputSchema: { type: 'object', properties: { ...basePaginationProps, ...extraProps }, }, - src/tools/queries.ts:112-116 (registration)Registration of the 'ninja_query_network_interfaces' tool in the queryTools array, exported and aggregated into ALL_TOOLS.
queryTool( 'ninja_query_network_interfaces', 'Query network interface information (IPs, MACs, adapters) across all devices.', '/queries/network-interfaces', ), - src/tools/queries.ts:11-28 (helper)Helper function queryTool() used to create the tool definition, including schema and handler, for all query-based tools.
function queryTool( name: string, description: string, path: string, extraProps: Record<string, unknown> = {}, ): ToolDef { return { tool: { name, description, inputSchema: { type: 'object', properties: { ...basePaginationProps, ...extraProps }, }, }, handler: async (args, client: NinjaOneClient) => client.get(path, clean(args)), }; }