Skip to main content
Glama

glass_logs

Read captured stdout/stderr logs with a resumable cursor. Return lines accumulated since last call, with optional server-side filtering by stream or substring.

Instructions

Read captured stdout/stderr log lines with a resumable cursor. glass_start captures the app's output from launch; this returns what has accumulated and a cursor to pass back next time, so a loop reads each line once. Returns immediately with whatever is there, including nothing at all — it does not wait, so use glass_wait_for_log when you want to block until a line appears (starting up, finishing work). Filter server-side with stream and contains rather than reading everything and scanning it yourself. The buffer keeps the most recent lines and drops the oldest, so a chatty app can age out lines you never read; the lines are the app's own output and are returned marked as untrusted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cursorNoResume point — the `cursor` a previous call returned, to read only what has been logged since. Omit to read from the oldest buffered line.
streamNo"stdout", "stderr", or "both" (default).
containsNoReturn only lines containing this substring (case-sensitive). Filtering happens server-side, so it narrows what the cap applies to.
max_linesNoCap on lines returned (default 200); the returned `cursor` resumes at the first line left unread, so a capped read is not a lost one.
Behavior5/5

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

With no annotations available, the description fully covers behavioral traits: it returns immediately, does not wait, uses a buffer that drops oldest lines, and marks returned lines as untrusted. It also explains the resumable cursor behavior, which is critical for correct usage.

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 dense yet every sentence contributes essential information. The opening statement states the core purpose, followed by cursor semantics, a comparison to a sibling tool, filtering advice, and buffer/untrusted behavior—all without redundancy.

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 that there is no output schema, the description sufficiently explains the return concept (accumulated lines plus a cursor) and the immediate-return contract. It also addresses security (untrusted lines) and buffer constraints, providing a complete operational picture for the agent.

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?

The description adds significant meaning beyond the schema, such as the cursor being a resume point to read each line once and that a capped read via max_lines still resumes without loss. It also clarifies that filtering is server-side and narrows what the cap applies to.

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 captured stdout/stderr log lines with a resumable cursor, which is a specific verb+resource+behavior. It also distinguishes itself from the sibling glass_wait_for_log by explicitly noting the alternative for blocking waits.

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?

Explicit guidance is provided: use glass_wait_for_log when blocking is desired, filter server-side with stream and contains instead of reading everything, and be aware that a chatty app can age out lines. This gives clear when-to-use and when-not-to-use direction.

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/fixed-width/glass'

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