Skip to main content
Glama
batteryshark

System Information MCP Server

by batteryshark

get_connected_devices

Identify and list all connected USB devices and paired Bluetooth devices to troubleshoot peripheral issues and maintain device inventory.

Instructions

Get USB and Bluetooth device information.

Lists all connected USB devices and paired/active Bluetooth devices. Useful for peripheral troubleshooting and device inventory.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The primary tool handler for 'get_connected_devices'. Decorated with @mcp.tool for registration. Fetches device info via get_connectivity_devices() helper, formats with timestamp/header, and returns as ToolResult text content.
    @mcp.tool def get_connected_devices() -> ToolResult: """Get USB and Bluetooth device information. Lists all connected USB devices and paired/active Bluetooth devices. Useful for peripheral troubleshooting and device inventory. """ info_sections = [] info_sections.append("# Connected Devices") info_sections.append(f"*Generated: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}*\n") try: info_sections.extend(get_connectivity_devices()) except Exception as e: info_sections.append(f"⚠️ **Device detection error**: {str(e)}") return text_response("\n".join(info_sections))
  • Core helper function implementing the device collection logic. Combines USB devices (via get_usb_devices()) and Bluetooth devices (via get_bluetooth_devices()), formats as markdown list.
    def get_connectivity_devices() -> List[str]: """Get USB and Bluetooth device information""" info = [] info.append("## 🔌 Connected Devices") # USB devices usb_info = get_usb_devices() if len(usb_info) > 1: # More than just the header info.extend(usb_info) # Bluetooth devices bt_info = get_bluetooth_devices() if len(bt_info) > 1: # More than just the header info.append("") # Add spacing info.extend(bt_info) return info

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/batteryshark/mcp-sysinfo'

If you have feedback or need assistance with the MCP directory API, please join our Discord server