Skip to main content
Glama
ifindv
by ifindv

serial_write

Destructive

Send data to a serial port device using a specified encoding. Requires an open connection ID and the data string; returns the number of bytes written or an error if the connection is invalid.

Instructions

Write data to a serial port connection.

Writes the specified data string to the serial port using the specified encoding.

Args: params (WriteDataInput): Validated input parameters containing: - connection_id (str): Connection ID returned by serial_open - data (str): Data to write as a string - encoding (str): Text encoding (default: 'utf-8') - timeout (float): Write timeout in seconds (default: 5.0)

Returns: str: Success message with bytes written or error message.

Success response: "Wrote 12 bytes to conn_1" Error response: "Error: Connection 'conn_1' not found or not open"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

The description states the tool writes data, which aligns with the destructiveHint=true annotation, confirming it modifies state. It also describes success and error messages, which adds transparency beyond annotations. The readOnlyHint=false and idempotentHint=false are consistent with the description. No contradictions found.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is moderately concise but includes a lengthy parameter breakdown (Args section) that could be streamlined. The core purpose is front-loaded, but the detailed parameter listing adds redundancy given the schema already provides that information.

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?

Given the tool's complexity (write operation with multiple parameters) and the presence of an output schema (though not detailed), the description provides sufficient context: it explains the operation, parameters, and expected output examples. It could mention prerequisite steps (serial_open) more explicitly, but overall it is adequate.

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?

Despite 0% schema description coverage (the schema itself has good parameter descriptions), the description adds value by summarizing the parameters (connection_id, data, encoding, timeout) and explaining their roles, including defaults. This compensates for the lack of schema-level descriptions, though it partly duplicates schema info.

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 clearly states the tool writes data to a serial port connection, specifying the action ('Write data to a serial port connection') and the primary parameters (data, encoding, timeout). This distinguishes it from siblings like serial_read, serial_open, etc. However, it could be more concise in stating its core purpose without the detailed parameter breakdown that is better placed in parameter descriptions.

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?

The description implies usage after serial_open and before serial_close, but does not explicitly state when to use this tool vs. alternatives. It mentions that connection_id must be from serial_open, which provides some context, but lacks guidance on when not to use it or alternatives for other write scenarios.

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

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