Skip to main content
Glama

serial_get_recent

Read-onlyIdempotent

Retrieves the most recent buffered serial-port lines without moving the read cursor, enabling quick inspection of recent UART output for debugging.

Instructions

Return the most recent N buffered lines regardless of read cursor.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portNoSerial port name, e.g. COM5 or /dev/ttyUSB0
linesNoDefault 100

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4/5.0
Behavior4/5

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

Annotations declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, and the description is consistent with these. It adds behavioral context by specifying that the operation ignores the read cursor, implying it does not advance it. This is useful beyond the annotations.

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 sentence, front-loaded with the primary action, and contains no redundant words. It is optimally concise.

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 two-parameter tool with no output schema and rich annotations, the description covers the core behavior and the key cursor detail. It does not specify return format, but that is not required given the simplicity and no output schema. It is complete enough for an agent to select and invoke it correctly.

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%, with both port and lines having descriptive text. The tool description's mention of 'N buffered lines' maps to the lines parameter, but it adds no new semantics beyond the schema. The parameter descriptions are sufficient on their own.

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 states a clear verb and resource: 'Return the most recent N buffered lines'. It adds a crucial qualifier 'regardless of read cursor' which distinguishes it from other serial read operations. This is unambiguous and specific.

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 description does not explicitly name alternative tools or conditions for when to use this vs. others. However, the phrase 'regardless of read cursor' implies it is appropriate when the caller does not want to disturb the read cursor, which is a clear contextual cue. But it lacks explicit exclusions or comparisons to siblings like serial_read or serial_get_log.

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