Skip to main content
Glama

tail_shell_output

Retrieve recent lines from a running shell process's output. Optionally drain the buffer to see only new output on subsequent calls.

Instructions

Return the most recent lines from a spawned process's output.

    Args:
        proc_id: From spawn_shell.
        n_lines: How many recent lines to return (capped at 500).
        stream: 'stdout', 'stderr', or 'both'.
        drain: If True, remove returned lines from the buffer so the
            next call sees only NEW output. Useful for polling loops.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
drainNo
streamNoboth
n_linesNo
proc_idYes
Behavior4/5

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

Without any annotations, the description carries full burden. It explains critical behavioral details: the 'n_lines' cap at 500, and the 'drain' mode that removes returned lines from the buffer so subsequent calls see new output. It does not cover error handling (e.g., invalid proc_id) or detailed return format, but the provided traits are substantial.

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?

The description is concise and well-structured: a single-line summary followed by bullet-point style parameter documentation. Every sentence adds value, with no redundancy or fluff. The summary is front-loaded.

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?

Despite good parameter descriptions, the tool lacks output schema and annotations, and the description does not specify the return format (e.g., string, list) or error behavior (e.g., invalid process ID). This leaves gaps for an agent to fully understand the tool's behavior.

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

Parameters5/5

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

Schema description coverage is 0%, so the parameter explanations in the description are essential. Each parameter is clearly described: 'proc_id' is from spawn_shell, 'n_lines' is capped at 500 (default 50), 'stream' options are 'stdout', 'stderr', or 'both', and 'drain' behavior removes lines from buffer. This adds significant meaning beyond the bare schema.

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 returns the most recent lines from a spawned process's output. It uses a specific verb ('Return') and resource ('shell output'), and implicitly distinguishes itself from sibling tools like spawn_shell and kill_shell by focusing on reading output.

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 description provides no explicit guidance on when to use this tool versus alternatives. It mentions the 'drain' parameter is 'useful for polling loops', which hints at a use case, but there are no comparisons or exclusions relative to the many sibling shell tools.

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/angrysky56/local-repl-mcp'

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