Skip to main content
Glama

session_output

Read the last lines of a session's terminal output and its status to inspect results, errors, or progress. Returns cleaned stdout/stderr and current state.

Instructions

Read the last lines of a session's terminal output (stdout and stderr merged, colors and progress redraws cleaned up), plus its status.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "id": "<id>"
    },
    "name": "session_output"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesSession id, as returned by `list_sessions` or `fire --bg`.
linesNoHow many trailing lines of output to return (default 100).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose useful behavior: stdout and stderr are merged, ANSI colors and progress redraws are stripped, and session status is appended. It does not say whether the call blocks or waits for new output, what happens for a finished or unknown session id, or whether reads are side-effect free, which are meaningful gaps for a terminal-inspection tool.

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?

A single front-loaded sentence that names the action, the resource, and the notable output normalization before the status clause. No redundant restatement of the tool name or the schema.

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?

There is no output schema, so the description must convey the return content, and it does: trailing lines plus status. It is nearly complete for a two-parameter read tool, with only the shape of the status value and edge-case behavior left unstated.

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

Parameters3/5

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

Schema description coverage is 100%, and the schema already documents both 'id' and 'lines' including the default of 100. The description adds no additional parameter meaning such as whether 'lines' counts logical versus wrapped lines or what happens when output is shorter than requested, so the baseline 3 applies.

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?

The description states a specific verb and resource ('Read the last lines of a session's terminal output') plus the secondary payload ('plus its status'), which is concrete enough to separate it from write-oriented siblings like send_input or stop_session. It stops short of naming any sibling explicitly, so it does not fully earn a 5 on 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 only implied: an agent infers this is how you inspect a session after starting or driving it. There is no explicit when-to-use statement, no exclusion ('do not use for full logs'), and no pointer to an alternative for other inspection needs.

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