replay_packet
Sends a single packet to USB hardware for testing or reverse engineering, requiring human confirmation to prevent irreversible damage.
Instructions
Send one packet to real USB hardware (destructive / irreversible on the device).
Side effects: opens the device via libusb/pyusb and writes the packet. Refuses unless user_confirmed=true after the human approved this exact vid/pid/endpoint/hex_data (and setup_hex if any). Needs OS permission to open the device. Prefer scaffold_driver to generate a driver first; never set user_confirmed from an agent guess.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"vid": "<vid>",
"pid": "<pid>",
"endpoint": "<endpoint>",
"hex_data": "<hex_data>"
},
"name": "replay_packet"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pid | Yes | USB product id (integer) | |
| vid | Yes | USB vendor id (integer, e.g. 0x1234 or 4660) | |
| endpoint | Yes | Endpoint address (e.g. 0x01 OUT); for control transfers use 0 with setup_hex | |
| hex_data | Yes | Payload bytes as hex (spaces optional), e.g. 'aa 01 ff 00 00 ab' | |
| setup_hex | No | Optional 8-byte control setup packet as hex; when set, sends a control transfer instead of bulk/interrupt | |
| user_confirmed | No | Must be true only after a human approved this exact packet; otherwise the call is refused |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |