getNetworkInfo
Retrieve detailed network information in the current operating environment to analyze connectivity, IP addresses, and related configurations for better system management.
Instructions
获取当前系统的网络信息
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"properties": {},
"required": [],
"type": "object"
}
Implementation Reference
- src/index.ts:329-340 (handler)The handler case for 'getNetworkInfo' tool that retrieves the system's network interfaces using Node.js 'os.networkInterfaces()' and returns the information as formatted JSON text.case "getNetworkInfo": { const networkInfo = { networkInterfaces: os.networkInterfaces() }; return { content: [{ type: "text", text: JSON.stringify(networkInfo, null, 2) }] }; }
- src/index.ts:55-63 (registration)Registration of the 'getNetworkInfo' tool in the tools list returned by the listTools handler, including name, description, and empty input schema.{ 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 (no parameters required).inputSchema: { type: "object", properties: {}, required: [] }