getNetworkInfo
Retrieve network configuration details from your current system to diagnose connectivity issues and monitor network status.
Instructions
获取当前系统的网络信息
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:329-340 (handler)Handler implementation for the 'getNetworkInfo' tool. Retrieves network interfaces using Node.js 'os.networkInterfaces()' and returns the data as a JSON-formatted text response.case "getNetworkInfo": { const networkInfo = { networkInterfaces: os.networkInterfaces() }; return { content: [{ type: "text", text: JSON.stringify(networkInfo, null, 2) }] }; }
- src/index.ts:56-63 (registration)Registration of the 'getNetworkInfo' tool in the listTools handler response. Defines the tool name, description, and input schema (empty object).name: "getNetworkInfo", description: "获取当前系统的网络信息", inputSchema: { type: "object", properties: {}, required: [] } },
- src/index.ts:58-62 (schema)Input schema definition for the 'getNetworkInfo' tool, specifying an empty object with no required properties.inputSchema: { type: "object", properties: {}, required: [] }