Skip to main content
Glama

decode_usb_packet

Read-onlyIdempotent

Decode raw USB 2.0 packets offline to inspect PID, address/endpoint/frame, payload, CRC5/CRC16 checks, and SETUP requests without hardware.

Instructions

Decode one raw USB 2.0 packet: PID, address/endpoint/frame, payload, CRC5/CRC16 check, and SETUP request decoding for 8-byte DATA0 payloads. No hardware needed.

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": {
      "hex_bytes": "<hex_bytes>"
    },
    "name": "decode_usb_packet"
  }
}

Input Schema

NameRequiredDescriptionDefault
hex_bytesYesRaw USB packet as hex (PID first, CRC included), e.g. '2d0010'.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

The annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is fully covered. The description adds the meaningful operational fact that decoding is purely offline ('No hardware needed'), but says nothing about behavior on malformed or truncated hex input.

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?

Two tight sentences: the decode output list comes first, the operational constraint last. No filler, no restating of the tool name, and every clause carries information.

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

Completeness4/5

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

An output schema exists, so the description needn't explain return values, and the sole parameter is fully documented. For a single-packet offline decoder this is nearly complete; only error/edge-case behavior for malformed input is unmentioned.

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

Parameters3/5

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

With a single parameter at 100% schema description coverage, the schema already explains that hex_bytes is raw hex with PID first and CRC included and gives an example. The description adds no format, length, or validation detail beyond that, so the baseline 3 applies.

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

Purpose4/5

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

The description gives a specific verb and resource — 'Decode one raw USB 2.0 packet' — and enumerates exactly what is extracted (PID, address/endpoint/frame, payload, CRC5/CRC16, SETUP request). The scope word 'one' sets it apart from the multi-packet analyzer_* siblings, though no sibling is named explicitly.

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

Usage Guidelines3/5

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

'No hardware needed' implies the offline use case versus the analyzer capture tools, which is useful implied guidance. However, there is no explicit when-to-use statement, no when-not statement, and no named alternative such as analyzer_transactions for bulk decoding.

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