Skip to main content
Glama

serial_send

Send a string to the connected STM32 board over serial and optionally wait to read the response, enabling command-response debugging and hardware-in-the-loop tests.

Instructions

Send data over serial and optionally read the response.

Sends the data string (plus line ending) to the connected board. If read_response is true, waits for and returns the response using a polling loop (50ms inter-byte, 200ms silence break).

Args: connection_id: Connection ID from serial_connect. data: The string to send. read_response: If true, wait for and return response data. read_timeout: Max seconds to wait for response (default 2.0). line_ending: Line ending to append — "lf" (default), "cr", "crlf", or "none".

Returns: What was sent, and the response if read_response is true.

Input Schema

NameRequiredDescriptionDefault
dataYes
line_endingNolf
read_timeoutNo
connection_idYes
read_responseNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/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 and does meaningful work: it discloses that sending appends a line ending, that the read is a polling loop with 50ms inter-byte and 200ms silence-break timing, and that read_timeout bounds the wait. What it omits is failure behavior (unconnected board, no response) and any warning that writing to a live target can perturb it.

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-loaded with the purpose, then Args/Returns sections — well structured and easy to scan. There is a small redundancy between the first sentence and 'Sends the data string (plus line ending) to the connected board,' but nothing is padded.

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?

For a five-parameter, two-required tool with no annotations, the description covers behavior, all parameters, and the return shape (an output schema also exists, so that section is a bonus rather than a necessity). The remaining gap is error/edge-case behavior when the connection is invalid or the read times out silently.

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 coverage is 0% — every property is just a title — so the description must compensate, and it does: all five params get meaning, including the line_ending value set ('lf', 'cr', 'crlf', 'none') that the schema does not encode as an enum, plus the read_timeout default and its unit. Only 'data' is thin (no encoding or size guidance).

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?

States a specific verb and resource ('Send data over serial') plus the conditional read behavior, which is enough to distinguish it from a pure-read sibling like serial_read. It does not explicitly name serial_read or serial_sequence as the alternatives, so sibling differentiation is implicit rather than stated.

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?

Usage is implied ('optionally read the response' hints that pure reads belong to serial_read), and connection_id is tied back to serial_connect, but there is no explicit when-to-use/when-not statement or named alternative. An agent must infer the routing from the sibling list rather than from the description.

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