Skip to main content
Glama

detect_baud

Determine a serial device's baud rate by probing common rates and ranking replies by readable text clarity.

Instructions

Try common baud rates on a closed port and rank them by how readable the reply is. Use when the user doesn't know the device's rate.

Each candidate is opened briefly, probe (default: a bare return) is sent, and whatever comes back is scored by its share of printable text. The right rate yields clean text; wrong rates yield garbage or nothing. Note: opening a port resets many Arduinos (DTR), and some devices (Kenwood CAT) only answer a real command, so pass e.g. probe="ID;" with probe_line_ending="NONE".

Args: port: The port to probe (must not be open here). probe: Text to send at each rate. Empty sends only the line ending. probe_line_ending: Line ending appended to the probe ("NONE" for CAT). candidates: Rates to try. Default: 9600, 115200, 19200, 38400, 57600, 4800, 2400, 1200, 230400. settle: Seconds to wait for a reply at each rate.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portYes
probeNo
settleNo
candidatesNo
probe_line_endingNoCR

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.2

TDQS

A4.4/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 burden and does well: it discloses the DTR side effect ('opening a port resets many Arduinos'), the scoring heuristic (share of printable text), that candidates are opened briefly, and that wrong rates yield garbage or nothing. Minor gaps remain — it never explicitly states the port is closed afterward or what happens when no rate succeeds — but the truly hazardous behavior is surfaced.

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?

The structure is well front-loaded: purpose sentence, then mechanics, then caveats, then a compact arg list. It is on the longer side, but nearly every sentence earns its place — the Arduino reset and CAT caveats are non-obvious and critical. Only slight redundancy (the default rates are stated in prose and implied by the schema's null default) keeps it from a 5.

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?

An output schema exists, so return-shape documentation is not required, and the description covers purpose, side effects, parameter semantics, and defaults thoroughly. The main omissions are failure behavior (what happens if no candidate produces readable text) and worst-case runtime (settle × candidate count), which an agent scheduling a call might want to know. For a 5-parameter tool with no annotations, this is still a strong, near-complete definition.

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 for all five parameters. It adds the crucial 'must not be open here' precondition to port, clarifies probe's empty-sends-line-ending behavior, explains the enum values' purpose ('NONE' for CAT), and enumerates the actual default candidate rates, which the schema hides behind null. Every parameter gains meaning beyond the raw schema.

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 first sentence names a specific verb/resource/outcome — 'try common baud rates on a closed port and rank them by how readable the reply is.' This clearly separates it from all 28 siblings, none of which perform baud detection, so an agent can select it unambiguously.

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?

It gives an explicit trigger condition: 'Use when the user doesn't know the device's rate.' It also adds a strong precondition ('port must not be open here') and device-specific usage advice (Kenwood CAT needs probe="ID;" with probe_line_ending="NONE"). It doesn't name alternatives, but no sibling covers this function, so exclusions are unnecessary.

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