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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

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()
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the return type ('Information about the USB device') but lacks details on what information is included, error handling (e.g., if no USB device is found), side effects, or performance considerations. This is insufficient for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and front-loaded, with the main purpose stated first and a brief note on returns. It avoids unnecessary details, but the second sentence ('Returns: Information about the USB device') could be integrated more smoothly. Overall, it is efficient with minimal waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has no parameters, an output schema exists (which should document return values), and no annotations, the description is minimally adequate. However, it lacks context on usage scenarios, error cases, or how it differs from siblings, leaving gaps in completeness for effective agent use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and the schema description coverage is 100%, so there are no parameters to document. The description does not need to add parameter semantics, but it correctly implies no inputs are required. Baseline 4 is appropriate for zero-parameter tools.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool's purpose ('Get the USB device connected to the system'), which is clear but vague. It specifies the resource (USB device) but lacks detail on what 'get' entails (e.g., retrieve details, list devices, check status). It distinguishes from some siblings like 'enumerate_devices' by focusing on USB, but not clearly from 'get_device' or 'get_local_device'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It does not mention prerequisites (e.g., system must have a USB device connected), exclusions (e.g., not for remote devices), or comparisons to siblings like 'enumerate_devices' (for listing all devices) or 'get_device' (possibly for generic device retrieval).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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