getNetworkInterfaces
Retrieve detailed network interface information to analyze connectivity, diagnose network issues, or monitor system performance using this tool in the MCP server toolkit.
Instructions
Get network interface information
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/network.ts:17-25 (handler)The handler function that retrieves network interfaces using Node.js 'os.networkInterfaces()' and formats the result as MCP content with JSON string.handler: async () => { const interfaces = os.networkInterfaces(); return { content: [{ type: 'text', text: JSON.stringify(interfaces, null, 2) }] }; }
- src/tools/network.ts:13-16 (schema)Input schema defining no required parameters for the getNetworkInterfaces tool.inputSchema: { type: 'object', properties: {} },
- src/index.ts:28-35 (registration)Central registration where networkTools (containing getNetworkInterfaces) is spread into the allTools object, which is used for listing and executing tools in the MCP server.const allTools: ToolKit = { ...systemTools, ...networkTools, ...geoTools, ...generatorTools, ...dateTimeTools, ...securityTools };