hid_descriptor
Decode HID report descriptors from capture paths or hex, optionally parse one report payload, to reveal report IDs/sizes before USB driver development.
Instructions
Decode a HID report descriptor (and optionally one report payload).
Read-only. When source is a capture path, finds GET_DESCRIPTOR type 0x22 transfers
(replug the device while capturing if none are present). When source is hex, parses that
descriptor directly (e.g. from /sys/class/hidraw/*/device/report_descriptor). Use this to
understand report IDs/sizes before or alongside report/scaffold_driver; it does not infer
vendor protocol fields from labelled actions.
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": {
"source": "<source>"
},
"name": "hid_descriptor"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | Capture path (searches for GET_DESCRIPTOR 0x22) or raw descriptor hex / hidraw report_descriptor bytes as hex | |
| decode_hex | No | Optional report payload hex to decode with the descriptor | |
| report_type | No | Report type for decode_hex: Input, Output, or Feature | Input |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |