Skip to main content
Glama
ESP32 DevOps MCP Server
by JosephR26

esp32_uart_discovery

Capture UART bytes passively to identify baud rate, packet boundaries, and protocol candidates; optionally send probes in active mode to test attached hardware.

Instructions

STAGE 3-5 for UART. Passive-first interrogation: captures raw bytes, hex, ASCII where valid, per-packet timestamps and boundaries, repeated patterns, baud clues and protocol candidates (NMEA 0183, UBX, AT, PN532 framing). Optionally scans common baud rates passively to find the working rate. Defaults to PASSIVE mode — nothing is transmitted. ACTIVE mode sends whatever you put in transmit (any bytes), or the UART probes of a named component profile.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "rx": "<rx>"
    },
    "name": "esp32_uart_discovery"
  }
}

Input Schema

NameRequiredDescriptionDefault
rxYesRX GPIO (REQUIRED)
txNoTX GPIO (optional, only needed for ACTIVE mode)
baudNoBaud rate, 300-3000000 (default: 9600)
modeNoPASSIVE listens only; ACTIVE also runs profile probes (default: PASSIVE)PASSIVE
portNoSerial port (optional)
parityNoParity (default: none)none
dataBitsNoData bits, 5-8 (default: 8)
stopBitsNoStop bits, 1 or 2 (default: 1)
transmitNoArbitrary bytes to send in ACTIVE mode. Any byte sequence is accepted — no component profile or documented command set is required.
componentNoComponent profile id (required for ACTIVE mode)
scanBaudsNoPassively try common baud rates and pick the most structured (default: false)
timeoutMsNoRequest timeout in ms (optional)
controllerNoUART controller 1 or 2 (UART0 carries the agent link) (default: 1)
durationMsNoCapture duration in ms, up to 30000 (default: 3000)
readLengthNoBytes to read back after transmitting (default: 64)
flowControlNoFlow control. Only "none" is available — the agent does not implement RTS/CTS.none

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the burden and largely succeeds: it explicitly states nothing is transmitted in PASSIVE mode, that ACTIVE sends arbitrary bytes, and what artifacts the capture produces. It omits error/timeout behavior and any note about the agent-link UART (left to the schema).

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 with the stage tag and the core verb, then progressively details capture artifacts and mode semantics. Dense but mostly earning its space; the parenthetical protocol list is the only slightly padded element.

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 16-parameter tool with no annotations and no output schema, the description covers the safety model (passive vs active), the nature of the returned capture, and mode defaults. Remaining gaps — return shape details, failure modes, and hardware-conflict warnings — are modest but present.

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

Parameters3/5

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

Schema coverage is 100%, so the schema already documents all 16 parameters; baseline is 3. The description does add a little meaning around the mode/transmit/component relationship, but it does not explain the interplay of duration, readLength, or timeoutMs beyond what the schema already says.

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?

States a concrete verb and resource: passive-first UART interrogation that captures raw bytes, hex, ASCII, timestamps, patterns, baud clues and protocol candidates. 'STAGE 3-5 for UART' positions it loosely in a workflow, but no sibling (e.g. esp32_spi_discovery or esp32_i2c_scan) is named to sharpen the boundary.

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 passive-by-default stance and the note that ACTIVE requires either raw `transmit` bytes or a `component` profile give real usage context. However, nothing says when to pick this over esp32_interface_discovery, esp32_component_probe, or the SPI/I2C equivalents, and no exclusions are stated.

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