Skip to main content
Glama

serial_write

Destructive

Send text or HEX data to a serial port for UART debugging and protocol testing. Choose text or hex input and optional line ending.

Instructions

Write text or HEX into an open capture session's port.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hexNoHEX bytes to send (exactly one of text/hex)
portNoSerial port name, e.g. COM5 or /dev/ttyUSB0
textNoText to send (exactly one of text/hex)
line_endingNoLine ending appended to writes: crlf/cr/lf/none

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the write/mutation nature is covered. The description adds the 'open capture session' context, which is useful but not elaborated. It does not mention what happens if the port is closed, if both text and hex are provided (schema enforces exactly one), or any side effects beyond writing. Given the annotations cover the destructive aspect, the description adds limited but non-contradictory value.

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?

A single sentence that is concise and front-loaded with the action. It states the purpose without redundancy. Every word earns its place; there is no filler.

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?

The description is minimal but covers the core action. However, it does not differentiate from the similar serial_send tool, and it omits explicit mention of the requirement that exactly one of text/hex must be provided (though schema covers this). With four parameters, no output schema, and a sibling that overlaps in functionality, the description is slightly under-specified for confident selection. It is adequate but leaves room for ambiguity.

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 description coverage is 100%, so all four parameters (hex, port, text, line_ending) are fully documented in the schema. The description adds no additional parameter-level meaning, such as format expectations or relationships. Baseline 3 is appropriate because the schema carries the parameter semantics.

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 states a clear verb 'Write' and resource 'port' with specific data formats (text or HEX). It implies a capture session context but does not distinguish itself from the sibling serial_send, which likely performs a similar write operation. Without differentiation, an agent may not know which to choose.

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

Usage Guidelines2/5

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

No guidance is given on when to use this tool versus serial_send or other siblings. It does not mention prerequisites beyond an 'open capture session' (which is implied but not explicit), nor does it provide any exclusion criteria. An agent is left to infer appropriate usage from the name and context.

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