getWifiInfo
Retrieve essential Wi-Fi details for the current device operating environment, including SSID, signal strength, and connection status, for troubleshooting or network analysis.
Instructions
获取当前设备的 Wi-Fi 信息
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"properties": {},
"required": [],
"type": "object"
}
Implementation Reference
- src/index.ts:531-539 (handler)The handler function for the getWifiInfo tool. It uses the systeminformation library (si.wifiNetworks()) to fetch current Wi-Fi networks information and returns it as a formatted JSON string in the tool response.case "getWifiInfo": { const wifiInfo = await si.wifiNetworks(); return { content: [{ type: "text", text: JSON.stringify(wifiInfo, null, 2) }] }; }
- src/index.ts:154-162 (registration)Registration of the getWifiInfo tool in the listTools response handler, including name, Chinese description, and an empty input schema (no parameters required).{ name: "getWifiInfo", description: "获取当前设备的 Wi-Fi 信息", inputSchema: { type: "object", properties: {}, required: [] } },
- src/index.ts:157-161 (schema)Input schema for getWifiInfo tool: an empty object (no required properties).inputSchema: { type: "object", properties: {}, required: [] }