Skip to main content
Glama

read_buffer

Fetch newly accumulated output from a session's stream buffer without blocking, optionally clearing it to monitor incremental text from shells or REPLs.

Instructions

Read newly accumulated text from the stream buffer without blocking.

Args: clear: If True, flushes the read buffer after fetching. session_id: Target session ID (defaults to currently active session).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clearNo
session_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/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 burden itself. It usefully discloses the non-blocking contract and that 'clear' mutates buffer state, but says nothing about behavior when no new text is available (empty return vs. error) or about invalid session IDs. An output schema exists, so return-format details are not required.

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?

The core behavior is front-loaded in a single tight sentence, followed by a compact Args block. No filler, though the Args restatement is somewhat formulaic.

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, non-destructive read tool with an output schema, the description covers purpose, blocking semantics, and both parameters adequately. The main omission is behavior on an empty buffer, which an agent would benefit from knowing when polling.

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 0%, so the description must do the work, and it does: it explains that 'clear' flushes the buffer after fetching and that 'session_id' defaults to the currently active session. Both parameters gain meaning not present in the bare schema types.

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 and resource ('Read newly accumulated text from the stream buffer') and adds a differentiating behavioral qualifier ('without blocking') that sets it apart from blocking read siblings like expect/exec_expect. It is clear about scope but never names a sibling explicitly, so it stops short of full differentiation.

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?

Usage is implied rather than stated: 'newly accumulated' and 'without blocking' suggest a polling use case as opposed to a blocking wait or a get_history call for past data. There is no explicit when-to-use or when-not-to-use guidance relative to the many sibling read/wait tools.

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