Skip to main content
Glama

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

NameRequiredDescriptionDefault
pidYesUSB product id (integer)
vidYesUSB vendor id (integer, e.g. 0x1234 or 4660)
endpointYesEndpoint address (e.g. 0x01 OUT); for control transfers use 0 with setup_hex
hex_dataYesPayload bytes as hex (spaces optional), e.g. 'aa 01 ff 00 00 ab'
setup_hexNoOptional 8-byte control setup packet as hex; when set, sends a control transfer instead of bulk/interrupt
user_confirmedNoMust be true only after a human approved this exact packet; otherwise the call is refused

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.2.1
    • addedInput schema / properties / endpoint / description
      Added value: +"Endpoint address (e.g. 0x01 OUT); for control transfers use 0 with setup_hex"
    • addedInput schema / properties / hex_data / description
      Added value: +"Payload bytes as hex (spaces optional), e.g. 'aa 01 ff 00 00 ab'"
    • addedInput schema / properties / pid / description
      Added value: +"USB product id (integer)"
    • addedInput schema / properties / setup_hex / description
      Added value: +"Optional 8-byte control setup packet as hex; when set, sends a control transfer instead of bulk/interrupt"
    • addedInput schema / properties / user_confirmed / description
      Added value: +"Must be true only after a human approved this exact packet; otherwise the call is refused"
    • addedInput schema / properties / vid / description
      Added value: +"USB vendor id (integer, e.g. 0x1234 or 4660)"
  2. First observedv0.2.0

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses destructive/irreversible device effects, the underlying mechanism (libusb/pyusb open + write), the OS permission requirement, and the exact human-approval gate. This is unusually rich behavioral context for a mutation tool.

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

Conciseness5/5

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

Front-loaded with the destructive warning, then side effects, then the confirmation gate and the sibling alternative. Every sentence adds operational value with no filler.

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

Completeness5/5

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

An output schema exists, so return values need no explanation. For a 6-parameter destructive hardware tool with no annotations, the description covers safety, mechanism, permissions, and the confirmation workflow, leaving nothing an agent needs missing.

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?

Schema coverage is 100%, so the baseline is 3; the description goes further by tying user_confirmed to approval of the specific vid/pid/endpoint/hex_data (and setup_hex if any), which clarifies the confirmation contract beyond the schema's field-level text. It doesn't add format/syntax detail for the hex fields themselves, so it falls short of a 5.

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

Purpose5/5

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

The first sentence states a specific verb (send) and resource (one packet to real USB hardware) and immediately flags the destructive scope. It also names the sibling it relates to (scaffold_driver), so an agent can distinguish it from the other capture/scaffold tools.

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

Usage Guidelines5/5

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

It gives explicit when-not guidance: prefer scaffold_driver first, and never set user_confirmed from an agent guess. The refusal condition (user_confirmed must be true only after a human approved this exact packet) tells the agent precisely when the call is valid versus rejected.

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