Skip to main content
Glama

serial_clear_buffer

Destructive

Clear buffered serial data and reset the read cursor for a specified port while preserving log files.

Instructions

Drop buffered lines and reset the read cursor; log files are kept.

Input Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.2/5.0
Behavior5/5

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

Annotations already mark destructiveHint true, and the description adds precise behavioral context: the buffer is dropped, the read cursor resets, and log files are preserved. This tells an agent exactly what side effects to expect beyond the generic destructive flag.

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?

A single tightly worded sentence front-loads the action, then clarifies a critical non-goal. There is no filler, repetition, or unnecessary information.

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 one-parameter destructive utility with no output schema, the description adequately covers what happens and what is preserved. It could be slightly more complete by noting any return value or whether the port must already be open, but these are minor gaps for such a simple operation.

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 description coverage is 100%, and the port parameter is fully self-documented in the schema. The description adds no additional parameter-level meaning, so the baseline of 3 is appropriate.

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 uses a specific verb and resource: 'Drop buffered lines and reset the read cursor.' It clearly names the tool's core action and distinguishes it from read/write/log-retrieval siblings, and the added 'log files are kept' prevents confusion with any log-destructive operation.

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 purpose statement makes the usage scenario inferable: call this when you need to discard buffered serial lines before continued reading. However, it does not explicitly state when to prefer this over siblings, name alternatives, or give any preconditions such as requiring an open port.

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