Skip to main content
Glama

send_hex

Send raw hex bytes to a serial device for binary protocols such as Icom CI-V, then pair with read_available to capture the binary reply.

Instructions

Send raw bytes given as hex. Writes to TX only; does NOT read.

Use for binary protocols — notably Icom CI-V, which is all hex (e.g. "FE FE 94 E0 03 FD"; civ_build makes these). Spaces in the hex string are ignored. To see a binary reply, call read_available afterward and hand the hex to civ_parse (binary replies rarely have a text prompt, so read_until_prompt usually isn't the right tool for these).

Args: hex_bytes: Bytes as hex, e.g. "FE FE 94 E0 03 FD". clear_buffer_first: Discard buffered RX before sending. connection: Which open connection (name). Default: the current one.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hex_bytesYes
connectionNo
clear_buffer_firstNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.2
    • addedInput schema / properties / connection
      Added value: +{
      +  "default": "",
      +  "title": "Connection",
      +  "type": "string"
      +}
  2. First observedv0.1.0

TDQS

A4.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses key behavioral traits: 'Writes to TX only; does NOT read', spaces in hex are ignored, and clear_buffer_first discards buffered RX. This goes well beyond the schema. It stops short of stating behavior on invalid hex or whether the call blocks, but the core behaviors an agent needs are transparent.

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?

The description is front-loaded with the core behavior and uses a compact paragraph for context followed by a clean bullet-style Args list. Every sentence serves a purpose: scope, example, usage guidance, parameter explanations. No filler or redundancy.

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?

Despite the tool's complexity (binary protocol handling), the description gives an agent everything needed to invoke it correctly: input format, connection default, buffer-clearing behavior, and the recommended read path. The output schema exists to explain return values, so the description's omission of that is acceptable. Even without annotations, the instructions are complete for correct use.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate for all three parameters. It does: hex_bytes format with an example, clear_buffer_first meaning ('Discard buffered RX before sending'), and connection semantics ('Which open connection (name). Default: the current one.'). This fully bridges the schema gap.

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?

States the action as 'Send raw bytes given as hex' and immediately notes 'Writes to TX only; does NOT read,' which distinguishes it from read tools. The mention of binary protocols and Icom CI-V differentiates it from send_text and other text-oriented siblings. It is specific, unambiguous, and an agent can select it without opening the schema.

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?

Explicitly says 'Use for binary protocols — notably Icom CI-V', gives an example, and contrasts with read_until_prompt: 'binary replies rarely have a text prompt, so read_until_prompt usually isn't the right tool for these.' It also recommends the correct follow-up pair (read_available + civ_parse), giving clear when-to-use and when-not-to-use direction.

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