Skip to main content
Glama
hardware-tooling-mcp
by Pheem49

read_serial_logs

Open a serial port, capture device logs for a set timeout, and automatically extract MCU crash dumps like backtraces to debug firmware failures.

Instructions

Open a serial port and read stdout/logs for timeout_sec seconds.

Automatically detects MCU crash dumps (e.g., ESP32 Guru Meditation Error, Brownout detector, Backtrace, HardFault) and extracts them for debugging.

Args: port: Serial port path (e.g., '/dev/ttyUSB0', '/dev/ttyACM0', 'COM3'). baudrate: Baud rate (default 115200). timeout_sec: Maximum duration in seconds to listen (default 5.0, max 60.0). max_lines: Maximum number of lines to collect before stopping. stop_on_pattern: Optional regex or substring to stop reading early when matched. stop_on_crash_dump: Whether to finish reading shortly after detecting a crash dump. reset_before_read: Pulse DTR/RTS to reset the board right after opening the port.

Input Schema

NameRequiredDescriptionDefault
portYes
baudrateNo
max_linesNo
timeout_secNo
stop_on_patternNo
reset_before_readNo
stop_on_crash_dumpNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With zero annotations, the description carries the full behavioral burden and does reasonable work: it discloses the hard timeout ceiling (max 60.0), default durations, the specific crash signatures it recognizes, and the side effect of pulsing DTR/RTS to reset the board. It does not cover what happens when the port is already occupied, whether the port is released afterward, or permission/error behavior.

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?

Front-loaded summary followed by a clean per-argument list; every sentence is functional. Minor redundancy between the crash-dump sentence in the summary and the stop_on_crash_dump argument text, but nothing wasteful enough to hurt usability.

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?

For a 7-parameter read tool with an output schema (so return values need not be described) and no annotations, the description covers behavior, limits, and side effects adequately. The remaining gap is failure modes—busy port, missing device, permission errors—which matter given the presence of free_serial_port and find_port_occupiers siblings.

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?

Schema description coverage is 0%, so the description must compensate, and it does: all seven parameters are explained with concrete port path examples, the default baud rate, the timeout max, regex-or-substring semantics for stop_on_pattern, and what stop_on_crash_dump and reset_before_read actually do. This adds substantial meaning the bare schema lacks.

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 opens with a concrete verb+resource+scope: 'Open a serial port and read stdout/logs for timeout_sec seconds', and adds a distinct secondary capability ('Automatically detects MCU crash dumps'). It is clearly separable from siblings like send_serial_command and list_serial_ports without needing their schemas.

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?

Usage is implied by the crash-dump framing (use this to capture boot/crash output), but the description never states when to prefer it over send_serial_command or how it relates to list_serial_ports / free_serial_port. No exclusion or prerequisite guidance is given, so the agent must infer routing.

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