Skip to main content
Glama

get_usb_device

Retrieve information about connected USB devices to analyze system hardware and manage device connections for debugging and instrumentation tasks.

Instructions

Get the USB device connected to the system.

Returns:
    Information about the USB device

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool handler for 'get_usb_device'. Retrieves the USB-connected Frida device directly using frida.get_usb_device() and returns its ID, name, and type, or raises ValueError if no USB device is found.
    @mcp.tool()
    def get_usb_device() -> Dict[str, Any]:
        """Get the USB device connected to the system.
    
        Returns:
            Information about the USB device
        """
        try:
            device = frida.get_usb_device()
            return {
                "id": device.id,
                "name": device.name,
                "type": device.type,
            }
        except frida.InvalidArgumentError:
            raise ValueError("No USB device found")
  • Supporting helper method in DeviceSelector for retrieving the USB device, used in device resolution logic (e.g., when device_id='usb').
    def _get_usb_device(self) -> Any:
        try:
            return self._frida.get_usb_device()
        except self._frida.InvalidArgumentError as exc:  # type: ignore[attr-defined]
            raise DeviceSelectionError("No USB devices detected") from exc
  • Call to _get_usb_device helper within _get_by_identifier method when identifier is 'usb'.
    return self._get_usb_device()

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/rmorgans/frida-mcp'

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