Skip to main content
Glama

stdbuf

Destructive

Control buffering of command output (stdout, stderr, stdin) to diagnose delays and ordering issues in pipelines. Set to unbuffered, line-buffered, or specify a byte size.

Instructions

Run a command with controlled stdout/stderr/stdin buffering: 0=none (unbuffered), L=line-buffered, or a byte size. Executes as a subprocess, captures bounded stdout/stderr, and enforces a safety timeout. Use --dry_run to preview without execution. Defaults to system buffering when no mode is set. Use to diagnose buffering-related output delays or ordering issues in pipelines. Not for CPU priority control — use 'nice'. Not for time-bounded execution — use 'timeout'. See also 'nice', 'timeout'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoRequested stderr buffering mode: 0, L, or a byte size.
inputNoRequested stdin buffering mode: 0, L, or a byte size.
outputNoRequested stdout buffering mode: 0, L, or a byte size.
dry_runNoReport without running the command.
timeoutNoSafety timeout for the command.
command_argsNoCommand and arguments to run.
max_output_bytesNoMaximum captured stdout/stderr bytes each.
Behavior4/5

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

Description adds that it executes as a subprocess, captures bounded output, and enforces a safety timeout. Annotations only provide destructiveHint=true, which is consistent. No contradiction.

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?

Compact, front-loaded, no fluff. Each sentence adds value. Well-organized into purpose, details, exclusions.

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?

Covers purpose, usage, behavioral traits, and parameter context. No output schema is acceptable. Complete enough for agent decision-making.

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 100% with parameter descriptions, but description adds usage context (e.g., 'Use --dry_run to preview', 'Defaults to system buffering'). Reinforces without repetition.

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 clearly states the tool runs a command with controlled buffering for stdout/stderr/stdin, specifying modes (0, L, byte size). It distinguishes from siblings like 'nice' and 'timeout'.

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

Usage Guidelines5/5

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

Explicitly states when to use (diagnose buffering-related delays) and when not (CPU priority, time-bounded execution). Names alternatives 'nice' and 'timeout'.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/caseSHY/AI-CLI'

If you have feedback or need assistance with the MCP directory API, please join our Discord server