Skip to main content
Glama

serial_query

Destructive

Send a HEX request to a serial port and read the response in one operation, using raw HEX or a named action from a YAML protocol file.

Instructions

One-shot write-then-read exchange; accepts hex or protocol+action from a YAML protocol file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hexNoHEX request payload
portYesSerial port name, e.g. COM5 or /dev/ttyUSB0
actionNoMessage name inside the protocol file
lengthNoStop after this many response bytes
parityNoParity (default none)
timeoutNoOperation timeout in ms (default 200)
baudrateNoBaud rate (default 115200)
bytesizeNoData bits: 5/6/7/8 (default 8)
protocolNoPath to YAML protocol file
stopbitsNoStop bits (default 1)
delimiterNoHEX delimiter that ends the read

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already communicate readOnlyHint=false, destructiveHint=true, and openWorldHint=true, so the description does not need to re-state basic risk. It adds the meaningful 'one-shot write-then-read' behavior, but it does not disclose side effects beyond the write, when the operation returns, whether it clears or consumes buffered data, or whether it leaves the port in a particular state.

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

Conciseness5/5

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

The description is a single, front-loaded sentence with no filler. It states the core behavior first and then the input alternatives, making it easy to scan and parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite 100% per-parameter schema coverage, this is a complex 11-parameter, destructive tool with no output schema and no return-value information. The description does not clarify relationships between parameters, how response reading terminates, what the function returns, or the constraints around using protocol versus hex. An agent would likely need additional inference or documentation to call it reliably.

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?

Schema description coverage is 100%, so the baseline is 3. The description adds value beyond the schema by clarifying that the tool accepts either a hex payload or a protocol file plus action, which implies two mutually exclusive invocation modes. This is important semantic information the schema does not directly express.

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 states a specific action ('one-shot write-then-read exchange') and the two supported input styles ('hex or protocol+action from a YAML protocol file'). This makes the tool's purpose identifiable, but it does not explicitly contrast it with siblings like serial_send, serial_read, or serial_shell, so it loses the last point.

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 'one-shot write-then-read' phrasing implies a combined query operation, and the two input modes are stated. However, there is no explicit when-to-use versus alternative tools, no statement about when hex should be preferred over protocol+action, and no mention of prerequisites such as an already-open serial port.

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