Skip to main content
Glama

Get a command's output

get_output
Read-onlyIdempotent

Retrieve the full recorded output of a terminal command, including command line, exit code, and timing. Use a command id or negative offset to specify the command.

Instructions

Get the full recorded output of one terminal command, plus its command line, exit code, cwd and timing, as plain text (ANSI escapes stripped; secrets masked by default). id: a command id from search_output/list_commands, or negative for relative addressing (-1 = the user's most recent command, -2 = the one before it). Outputs larger than max_bytes return the head and tail around a '[... N bytes omitted ...]' marker — call again with a larger max_bytes for more. Errors with 'not found' if the id doesn't exist. Read-only: reads the recording, never re-runs the command.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYescommand id, or -N for Nth most recent (-1 = last command)
max_bytesNocap on returned output size (default 51200); if the output is larger, the head and tail are returned with a gap marker
Behavior5/5

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

The description discloses key behaviors beyond annotations: ANSI stripping, secret masking, truncation with gap marker, error behavior ('not found'), and read-only nature. Annotations already indicate read-only and idempotent, but the description adds specific, actionable details.

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 front-loaded with the tool's purpose, followed by parameter explanations. Every sentence adds essential information, with no wasted words.

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

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite no output schema, the description fully explains what is returned (output text, metadata) and covers edge cases (large output, error). Combined with complete annotations and parameter schema, it leaves no significant gaps.

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%, so baseline is 3. The description adds value by explaining the meaning of negative ids for relative addressing and the default and truncation behavior for max_bytes, exceeding what the schema provides.

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 retrieves the full recorded output of a terminal command, including command line, exit code, cwd, and timing. It distinguishes itself from sibling tools (search_output, list_commands, diff_output) by focusing on output retrieval.

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

Usage Guidelines4/5

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

The description explains how to obtain a command id (from search_output/list_commands or relative addressing) and how to handle large outputs (using max_bytes). It does not explicitly exclude any scenarios, but the read-only note implies safe usage.

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/soren-achebe/backscroll'

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