Skip to main content
Glama
alxgmpr

serial-mcp

by alxgmpr

serial_write_hex

Write raw hex bytes to a serial port for binary protocols like Modbus, bootloader commands, or firmware upload. Provides exact byte-level control without newline appended.

Instructions

Write raw bytes (specified as hex) to the serial port.

Use this for binary protocols (Modbus, bootloader commands, firmware upload, raw UART framing) where you need exact byte-level control. No newline is appended.

Examples: - Send Modbus query: serial_write_hex(hex_string="01 03 00 00 00 0A C5 CD") - Send break byte: serial_write_hex(hex_string="FF") - STM32 bootloader: serial_write_hex(hex_string="7F")

Args: hex_string: Hex-encoded bytes separated by spaces (e.g. "AA 55 01 03 FF") session_id: Port name of the session. Optional if only one session is open.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hex_stringYes
session_idNo
Behavior4/5

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

Discloses key behavioral trait: 'No newline is appended.' This adds value beyond annotations, which are consistent (readOnlyHint=false, destructiveHint=false). Could mention error handling or blocking behavior, but current detail is sufficient.

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: purpose, usage context, examples, then args. Front-loaded with key info. Examples are helpful but slightly length; overall efficient without being verbose.

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?

Covers purpose, usage, and parameters comprehensively. Lacks mention of return value or error behavior, but given tool simplicity and no output schema, this is a minor gap. Still robust for agent selection.

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?

With 0% schema description coverage, the description fully compensates. Specifies hex_string format as 'hex-encoded bytes separated by spaces' with examples, and explains session_id as 'port name of the session. Optional if only one session is open.' Highly informative.

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 'Write raw bytes (specified as hex) to the serial port.' Differentiates from siblings by emphasizing binary protocols and byte-level control, making its purpose distinct from tools like serial_write (for text) or serial_read_hex.

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?

Explicitly advises 'Use this for binary protocols (Modbus, bootloader commands, firmware upload, raw UART framing) where you need exact byte-level control.' Examples further clarify typical use cases, effectively guiding when to select this tool over 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/alxgmpr/serial-mcp'

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