Skip to main content
Glama

serial.open

Open a serial port connection and obtain a connection ID for subsequent read, write, and control operations.

Instructions

Open a serial port connection. Returns a connection_id for use with other serial tools. The port stays open across tool calls until serial.close is called or the server exits. Defaults are 115200 baud, 8N1, \r\n line terminator — the most common settings. If you don't know the correct settings, check for a protocol spec with serial.spec.list or ask the user. Wrong baud rate is the most common cause of garbled data. After opening: 1) Use serial.spec.list to check for a matching protocol spec. If a match is found, attach it with serial.spec.attach. 2) Use serial.plugin.list to check for a plugin that matches the device. If a matching plugin is loaded, its tools are available to use directly. 3) Do a serial.read to check for any buffered data — many devices send a boot banner, prompt, or status message on connection.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portYesSerial port path (e.g. /dev/ttyUSB0, COM3).
baudrateNoBaud rate (default 115200). Common values: 9600, 19200, 38400, 57600, 115200.
bytesizeNoData bits (default 8).
parityNoParity: N(one), E(ven), O(dd), M(ark), S(pace). Default N.N
stopbitsNoStop bits (default 1).
timeout_msNoRead timeout in milliseconds (default 200).
write_timeout_msNoWrite timeout in milliseconds (default 200).
exclusiveNoRequest exclusive access (platform-dependent, ignored if unsupported).
encodingNoDefault text encoding for this connection (default utf-8).utf-8
newlineNoDefault line terminator for readline and append_newline (default \r\n).\r\n
Behavior4/5

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

No annotations provided, so description carries full burden. Discloses that port stays open, defaults, common cause of garbled data (wrong baud rate), and expected post-open actions. Lacks mention of permission issues but is otherwise thorough.

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: starts with purpose, then persistence, defaults, then a numbered list of steps. Each sentence adds value, though slightly long. Front-loaded with core information.

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 10 parameters, 100% schema coverage, no output schema, and no annotations, the description is remarkably complete. Covers lifecycle, defaults, common errors, and post-open workflow. Leaves little ambiguity for an agent.

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?

Schema coverage is 100%, so baseline 3. Description adds value by contextualizing defaults (e.g., 'most common settings'), explaining common pitfalls (wrong baud rate), and clarifying the purpose of parameters like newline and encoding.

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?

Clearly states 'Open a serial port connection' and explains it returns a connection_id for use with other serial tools. Distinguishes from siblings by noting the port stays open across calls until serial.close.

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?

Provides explicit guidance on when to use (check settings if unsure, defaults given) and a step-by-step process after opening. Does not explicitly mention when not to use, but context from siblings implies it's the first step.

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

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