Skip to main content
Glama

read_target_console

Read UART console output from a target board's passive ring buffer to capture bootloader or kernel messages; filter by regex and select earliest or most recent lines.

Instructions

Read lines from the target board UART console buffer (CDC1).

NOTE: This reads the passive UART reception ring buffer (e.g. bootloader or kernel output). To read system logs from an already running Linux target, use send_target_command.

Args: tail_lines: Number of most recent lines from the end of the buffer (default: 50 if head_lines not specified). head_lines: Number of earliest lines from the start of the buffer (e.g. first N lines of bootloader after reset). grep: Optional case-insensitive regex pattern to filter lines (e.g. 'panic|error|SafeRTOS').

Input Schema

NameRequiredDescriptionDefault
grepNo
head_linesNo
tail_linesNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It discloses the data source (passive ring buffer, non-blocking reception implied) and the bootloader/kernel use case, but says nothing about whether the read is destructive to the buffer, whether it blocks waiting for new output, or how ring-buffer overflow affects results.

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-loads the core action, then a scoping NOTE, then an Args block — a sensible order with no filler. Slightly verbose in the parenthetical examples, but each clause adds selection or invocation value.

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-value shape need not be explained. Given zero annotations, the description adequately covers purpose, source, and all three parameters; the only real gap is operational behavior (blocking, buffer consumption), which keeps it short of a 5.

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 coverage is 0%, so the description must carry all parameter meaning, and it largely does: `tail_lines` (most recent lines, with the 'default 50 if head_lines not specified' rule), `head_lines` (earliest lines, with a concrete bootloader scenario), and `grep` (case-insensitive regex, with an example pattern). It does not clarify whether head_lines and tail_lines may be combined or what happens if both are set.

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?

States a specific verb+resource ('Read lines from the target board UART console buffer (CDC1)') and immediately scopes what kind of buffer it is (passive UART reception ring buffer, e.g. bootloader/kernel output). It explicitly distinguishes itself from the sibling `send_target_command`, so an agent can route without opening a schema.

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?

The NOTE gives an explicit when-to-use-this vs. use-another rule: passive UART/bootloader capture here, running-Linux logs via `send_target_command`. It does not address the other plausible siblings (`clear_target_console`, `wait_for_console_pattern`), so the guidance is clear but not exhaustive.

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