Skip to main content
Glama
alxgmpr

serial-mcp

by alxgmpr

serial_open

Open a serial connection to a specified port, with auto-discovery of available ports and configurable baud rate, data bits, stop bits, parity, and timeouts. Close the port when finished to free the device.

Instructions

Open a serial connection to the specified port.

If port is omitted, automatically discovers available ports. When only one port is found it is used directly; when multiple are found, elicitation is used to let the user pick one.

IMPORTANT: Always call serial_close() when you are finished with the port. Leaving a port open prevents other processes from accessing the device. The session will be automatically closed after inactivity_timeout seconds of no activity.

Common configurations:

  • Most devices: 115200 baud, 8N1 (the defaults)

  • Older equipment: 9600 baud, 8N1

  • Use serial_detect_baud() first if unsure of the baud rate.

Args: port: Serial port device path (e.g. /dev/ttyUSB0, COM3). Optional — omit to auto-discover. baud_rate: Baud rate for the connection data_bits: Number of data bits (5, 6, 7, or 8) stop_bits: Number of stop bits (1, 1.5, or 2) parity: Parity checking ("none", "even", "odd", "mark", "space") timeout: Read timeout in seconds inactivity_timeout: Seconds of inactivity before the session is auto-closed (default 900 = 15 min)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portNo
parityNonone
timeoutNo
baud_rateNo
data_bitsNo
stop_bitsNo
inactivity_timeoutNo
Behavior5/5

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

Adds critical behavioral context beyond annotations: warns that leaving port open blocks other processes, mentions auto-close after inactivity_timeout, and implies session management. No contradiction with annotations.

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?

Well-structured with summary, important note, common configs, and Args. Slightly verbose but every sentence adds value. Could trim some 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?

Comprehensive for a connection-opening tool: covers parameters, usage sequence, behavioral constraints, and common configurations. Suitable for an agent to invoke correctly.

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

Parameters4/5

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

With 0% schema coverage, description fully explains all 7 parameters in Args section, including defaults and examples. Could add more detail on timeout semantics but is sufficient.

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 opens a serial connection and explains auto-discovery when port is omitted. It distinguishes from siblings like serial_close and serial_detect_baud.

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?

Provides explicit when to use (e.g., omit port for auto-discovery) and when not to (e.g., call serial_close after). Includes alternatives like serial_detect_baud for baud rate uncertainty.

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/alxgmpr/serial-mcp'

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