Skip to main content
Glama

read

Retrieve buffered serial data to capture device logs, sensor output, or late replies. Configure timeout, settle, and hex format to get exact bytes.

Instructions

Read and consume buffered data from the device (logs, sensor output, late replies).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portYesPort device from list_ports (e.g. /dev/cu.usbserial-0001, /dev/ttyUSB0, COM3), or a pyserial URL such as socket://host:port, rfc2217://host:port or loop://.
as_hexNoAlso return the raw bytes as hex.
max_bytesNoUpper bound on returned bytes.
settle_msNoAfter data starts arriving, keep collecting until the line is silent for this many ms (0 = return as soon as anything is available). Useful for multi-line replies.
timeout_sNoSeconds to wait for the first byte if nothing is buffered.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
hexNoRaw bytes as hex when as_hex=true.
textYesDecoded data (undecodable bytes become U+FFFD).
bytesYes
errorNo
timed_outYesTrue if nothing arrived before the timeout.
Behavior2/5

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

The word 'consume' adds some behavioral meaning by implying data is drained from the buffer. However, there are no annotations, and the description omits important behavior such as blocking/timeout semantics, whether data is removed from the device buffer, and how this interacts with clear_buffer.

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?

The description is a single concise sentence with an efficient parenthetical list of examples. It is front-loaded with the core action and contains no filler, though it is too sparse to cover the behavioral and usage context needed.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Even with a rich schema and output schema present, the description leaves a major gap in helping the agent choose between read, read_until, tail, and query. With no annotations, the description carries the burden of explaining buffer consumption and blocking behavior, which it does not fulfill.

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?

The input schema provides 100% parameter descriptions, so the baseline is 3. The description adds no parameter-specific meaning beyond mentioning the types of data returned; it does not compensate for or add to the schema explanations.

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 specific action ('Read and consume buffered data') on a clear resource ('the device') and gives concrete examples of what that data may be. It is understandable on its own, but it does not explicitly distinguish itself from closely related siblings like read_until, tail, and query.

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?

There is no guidance about when to use this tool instead of read_until, tail, query, or clear_buffer. The phrase 'buffered data' implies a usage context, but the description never states exclusions or alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/HumbertoBernal/mcp-serial'

If you have feedback or need assistance with the MCP directory API, please join our Discord server