Skip to main content
Glama

diagnose_frame

Read-only

Diagnose a raw frame without hardware by verifying checksum/encoding combinations and testing expected command parsing at nearby offsets to expose off-by-N framing.

Instructions

Diagnose one raw frame, pure computation — no hardware, no audit entry. Every checksum algorithm x value encoding is verified at the default tail position (checksum_matrix); each row's at is the byte offset where the stored checksum starts (frame_len - stored_len; stored_len is the algorithm's byte count for raw, twice that for ascii_hex), and a row whose algorithm cannot apply to this frame carries only kind/encoding/error, no at. With expected:{device,command} the command's response.parse is also attempted at byte offsets -2..=+2 (parse_attempts) to expose off-by-N framing — parsed: true only means the bytes are structurally decodable at that offset; the offsets are mutually exclusive hypotheses, so judge which (if any) is the real alignment yourself. The result declares view:{kind:"diagnostics"} for show_result.

Input Schema

NameRequiredDescriptionDefault
hexYesThe frame bytes, e.g. "01 04 02 08 9B FA 8D"
expectedNo{device, command}: the workspace command whose response.parse the frame was expected to satisfy

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, non-destructive, closed-world), and the description adds substantial semantics beyond them: what each checksum_matrix row contains, why a row may omit `at`, and a crucial warning that `parsed: true` only means structural decodability at a mutually exclusive hypothesis offset. This directly prevents misreading the output.

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?

Front-loads the core purpose and constraint, then layers the output semantics in one dense but purposeful paragraph. Some nested parentheticals (stored_len computation) are heavy, but no sentence is filler.

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?

With no output schema, the description carries the burden and does it well: it names the result sections (checksum_matrix, parse_attempts), the row fields, and the view declaration for show_result. Only a few edge details (frame size limits, error result shape) are left implicit.

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, but the description goes further by spelling out how `expected:{device,command}` behaves (response.parse attempted at byte offsets -2..=+2) and by explaining the hex-frame coming from the byte offsets rather than the schema's example.

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?

Opens with a specific verb+resource ('Diagnose one raw frame') and immediately scopes it against the hardware-touching siblings ('pure computation — no hardware, no audit entry'). An agent can tell this apart from send/capture_start/capture_frames without opening another schema.

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?

Clearly establishes the use context (offline, no hardware, no audit entry) and explains when to supply `expected` (to trigger parse_attempts for off-by-N framing). It does not explicitly name alternative siblings to use instead, but the contrast with hardware tools makes the routing condition inferable.

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