Skip to main content
Glama

decode_protocol

Decode saved logic-analyzer captures using single-layer or stacked protocol decoders, map protocol roles to channels, and return bounded structured events instead of raw waveforms.

Instructions

Decode a saved capture with bundled single-layer or stacked protocol decoders. Protocols: can, cjtag, i2c, i2s, ir_nec, jtag, jtag_ejtag, jtag_stm32, lin, mdio, modbus, onewire_link, onewire_network, ps2, qspi, sdcard_sd, sdcard_spi, spdif, spi, spiflash, swd, usb_signalling. Map protocol roles explicitly, for example channels={scl:D0,sda:D1}. Inspect capabilities for each protocol's required/optional channels and typed options. Returns bounded structured events, never raw waveform arrays.

Input Schema

NameRequiredDescriptionDefault
optionsNoTyped decoder options. Use decoder.option when stacked layers share a name, for example spi.cpol=0. See capabilities.
start_sNo
channelsYesProtocol role to capture channel, e.g. {"scl":"D0","sda":"D1"}
protocolYes
capture_idYes
duration_sNo
max_eventsNo
include_bitsNo
include_lower_layersNoInclude lower-layer annotations for stacked protocols.

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?

With no annotations, the description carries the full burden. It usefully discloses the return shape ("bounded structured events, never raw waveform arrays"), which tells the agent output is size-limited and non-raw. It says nothing about failure modes (unsupported protocol, channel/role mismatch), cost of decoding, or how bounds interact with max_events.

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?

Three dense, front-loaded sentences with no filler, and the channel-mapping example is well placed. The 22-protocol list duplicates the enum verbatim, which is redundant text, though it does aid at-a-glance capability scanning.

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?

For a 9-parameter tool with no annotations, no output schema, and only 33% schema coverage, the description covers the return contract and defers options detail to capabilities. It leaves the temporal windowing (start_s/duration_s) and the practical meaning of max_events/include_bits unexplained.

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?

Schema coverage is only 33%, so several parameters (capture_id, start_s, duration_s, max_events, include_bits) are undocumented anywhere. The description reinforces the channels role-mapping and the decoder.option stacking syntax, but those are already in the schema; it adds nothing for the time-window or event-limit parameters beyond the vague "bounded".

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 uses a specific verb+resource ("Decode a saved capture") and enumerates the supported protocol decoders, which clearly distinguishes it from the narrow sibling decode_uart. It never names a sibling directly, so the differentiation is implicit rather than explicit.

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

Usage Guidelines4/5

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

It tells the agent to "Inspect capabilities for each protocol's required/optional channels and typed options" before calling, which is an actionable prerequisite pointing at the capabilities sibling. It gives a concrete channel-mapping example but no when-not-to-use guidance (e.g., when to prefer decode_uart).

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