Skip to main content
Glama

connect

Open a serial port with configurable baud and flow control to start reading device output, enabling command exchange with serial consoles and hardware.

Instructions

Open a serial port and start the background reader.

The defaults are 9600 baud, 8 data bits, no parity, 1 stop bit, no flow control ("9600 8N1"), which is what most console/craft ports and much radio gear expect. Every setting can be overridden when the user says so, e.g. "38400 with XON/XOFF" -> baud=38400, xonxoff=True.

Args: port: System port name, e.g. "COM4" (Windows), "/dev/cu.usbserial-10" (macOS), or "/dev/ttyUSB0" (Linux). Get exact names from list_serial_ports. baud: Baud rate. Common values: 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200. Check the device's console/CAT menu if unsure. bytesize: Data bits: 5, 6, 7, or 8. Almost always 8. parity: "N" none, "E" even, "O" odd. Almost always "N". stopbits: 1, 1.5, or 2. Almost always 1. rtscts: Hardware (RTS/CTS) flow control. Off by default; only turn on if the device's manual says so and the cable carries those lines. xonxoff: Software (XON/XOFF) flow control. Off by default. Do not use for binary protocols (it swallows 0x11 / 0x13 bytes). timeout: Reserved for compatibility; the reader thread polls the port on a fixed short interval regardless, so reads never block Claude.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
baudNo
portYes
parityNoN
rtsctsNo
timeoutNo
xonxoffNo
bytesizeNo
stopbitsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It does a good job: it explains that a background reader is started, reads never block Claude (due to the fixed polling interval), and warns about the `xonxoff` parameter swallowing binary bytes. It also notes that `timeout` is reserved for compatibility, which is important behavioral context. The only minor gap is that it doesn't explicitly state the background reader will keep reading indefinitely or how to stop it (though `disconnect` likely handles that).

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 well-structured and front-loaded with the core purpose first, followed by defaults and then parameter details. It is concise, with no fluff, and every sentence adds value. The use of bullet points and short sentences makes it easy to scan, and it avoids unnecessary repetition.

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?

Given the tool's complexity (8 parameters, 1 required, varied use cases), the description is remarkably complete. It covers defaults, parameter semantics, edge cases (binary protocols, flow control), and the non-blocking behavior. With an output schema present and sibling tools listed, an agent has everything it needs to call this tool correctly without ambiguity.

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?

Since schema description coverage is 0%, the description must compensate, and it does excellently. It explains each parameter in plain language, providing common values and guidance on when to change them (e.g., 'almost always 8' for bytesize, 'only turn on if the device's manual says so' for rtscts). It also gives real-world examples for the `port` parameter and detailed notes on `xonxoff` behavior. This adds substantial value beyond the schema.

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?

The description clearly states the tool's purpose: opening a serial port and starting a background reader. It specifies the resource (serial port) and the action (open and start). It also provides essential default settings (9600 8N1) that distinguish it from other tools like `list_serial_ports`, which only lists ports.

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?

The description implies when to use this tool (when you need to establish a serial connection) and it references a sibling tool (`list_serial_ports`) for getting port names, which helps with the selection process. However, it does not explicitly state when NOT to use this tool or mention alternatives like `reconnect_last` for reusing a previous connection, which would be useful.

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