Skip to main content
Glama

read_output

Read output from any active interactive session by its ID. Configurable timeout waits for new output before returning the collected text.

Instructions

Read / poll output from any active interactive session by its ID. Works with msfconsole, SSH, mysql, python REPL, shell, or any other session type managed by the backend.

Typical workflow:

  1. send_input(session_id, "whoami\n")

  2. read_output(session_id, timeout=5) -> returns the command's output

The backend will wait up to timeout seconds for new output before returning whatever is available (which may be empty if the process has not produced anything yet).

Args: session_id: The session identifier to read from. timeout: Maximum seconds the backend should wait for new output before returning (default: 5). Use a higher value for slow commands (e.g. nmap, compilation). lines: Maximum number of output lines to return (default: 100). Older lines are trimmed first when the buffer exceeds this.

Returns: dict with at minimum: - success (bool): whether the read succeeded - output (str): the collected output text - session_id (str): echo of the session targeted - lines_returned (int): number of lines in output - error (str, optional): present only on failure

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
linesNo
timeoutNo
session_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

No annotations provided, so description carries full burden. Explains timeout behavior (waits and returns available output, possibly empty), buffering of lines, and return structure. Fully transparent.

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?

Well-structured: one-sentence summary, followed by workflow, parameter descriptions, and return format. Every sentence earns its place; no fluff.

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?

Given complexity, description covers behavior, parameters, workflow, and return structure. No gaps; sufficient for an agent to use correctly.

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 has 0% description coverage, but description explains all three parameters (session_id, timeout, lines) with meaning, defaults, and usage tips (e.g., higher timeout for slow commands). Adds significant value beyond 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 reads/polls output from active interactive sessions by ID, specifying the verb, resource, and scope. It distinguishes from sibling tools like send_input, which sends input.

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?

Provides a typical workflow (send_input then read_output) and lists supported session types. Does not explicitly mention when not to use or compare to similar tools like exec_stream, but the workflow guidance is clear.

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/zebbern/zebbern-kali-mcp'

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