Skip to main content
Glama

clear_buffer

Discard all buffered serial lines for a port to reset captured output while sequence numbers keep increasing.

Instructions

Drop all captured lines for a port; sequence numbers keep increasing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose the destructive scope ('drop all captured lines') and a genuinely non-obvious invariant ('sequence numbers keep increasing'), which is useful. However, it says nothing about whether the port must be open, whether previously returned lines are invalidated, or any permission/error behavior.

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?

One tight, front-loaded sentence with no filler. The trailing sequence-number clause is terse to the point of being slightly cryptic, but it earns its place as behavioral information.

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

Completeness3/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 values needn't be explained. For a destructive, unannotated buffer-clearing tool the description covers the essentials but omits port-open prerequisites and the effect on subsequent read_lines calls.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% for the single 'port' parameter, so the description must compensate. It only says 'for a port' without clarifying whether this is a name from list_ports, a device path, or a handle, leaving the key ambiguity unresolved.

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?

States a specific verb+resource: 'Drop all captured lines for a port.' An agent can distinguish this from read_lines or close_port. It stops short of explicitly naming the sibling it complements (read_lines), so it is clear but not fully differentiated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No when-to-use or when-not-to-use guidance. The reader must infer from the name that this discards buffered data rather than closing or reading the port. Nothing warns about the interaction with read_lines or about when clearing is appropriate.

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