getBluetoothInfo
Retrieve detailed Bluetooth information from the current device to monitor connection status, paired devices, and configurations for environment analysis.
Instructions
获取当前设备的蓝牙信息
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"properties": {},
"required": [],
"type": "object"
}
Implementation Reference
- src/index.ts:660-667 (handler)The handler for the 'getBluetoothInfo' tool. It uses the 'systeminformation' library (imported as 'si') to fetch Bluetooth devices via si.bluetoothDevices() and returns the information as a JSON string in the tool response format.case "getBluetoothInfo": { const bluetoothInfo = await si.bluetoothDevices(); return { content: [{ type: "text", text: JSON.stringify(bluetoothInfo, null, 2) }] };
- src/index.ts:217-225 (registration)Registration of the 'getBluetoothInfo' tool in the list of available tools returned by handleRequest. Includes the tool name, description, and empty input schema.{ name: "getBluetoothInfo", description: "获取当前设备的蓝牙信息", inputSchema: { type: "object", properties: {}, required: [] } },
- src/index.ts:220-224 (schema)The input schema for the 'getBluetoothInfo' tool, which requires no parameters (empty object).inputSchema: { type: "object", properties: {}, required: [] }
- src/index.ts:9-9 (helper)Import of the 'systeminformation' library (as 'si'), which provides the bluetoothDevices() function used in the handler.import si from 'systeminformation'; // 导入 systeminformation 库