Skip to main content
Glama
tiefeiyu
by tiefeiyu

process_read

Read process output from a specified time window, handling merged PTY streams and fragmented lines, while resetting the process idle timer.

Instructions

Read output from a process. Reads records from the specified time window. Resets the process idle timer.

For PTY processes stderr is merged into stdout (source=stderr reads return empty) and records are arbitrary chunks, not lines — a line may span multiple records. Prompts may arrive without a trailing newline. Read with a generous duration — the default window is only 1s.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesInternal process ID.
unitNoTime unit for duration.ms
sourceNoWhich output stream to read.both
durationNoHow far back to read (in the specified unit).
Behavior5/5

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

With no annotations, the description carries full disclosure responsibility. It reveals significant behavioral traits: idle timer reset, PTY stderr merging, chunked records, prompts without newlines, and the short default window. This goes well beyond a generic 'read' statement.

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 compact and front-loaded. The first sentence states the core purpose, followed by a short functional summary, then a tight paragraph with high-value edge cases. Every sentence earns its place with no redundancy.

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?

The description covers the essential behavioral quirks and usage advice, making it nearly complete for a read tool. It does not describe the return format (e.g., list of records), but the absence of an output schema is partially mitigated by the mention of 'records' and 'chunks'. A brief note on return shape would push this to 5.

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 already describes all parameters (100% coverage). The description adds context around duration ('default window is only 1s') and the source parameter for PTY processes, reinforcing the interaction between unit and duration. This elevates it above the baseline 3, though the schema already carries most parameter meaning.

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 opens with 'Read output from a process' – a specific verb and resource. It immediately distinguishes this from sibling tools like process_write, process_list, and process_kill. The scope ('specified time window') and the additional behavior ('Resets the process idle timer') further clarify purpose.

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 clear situational guidance, such as 'Read with a generous duration — the default window is only 1s' and explains PTY-specific behavior (stderr merged, chunks not lines). However, it does not explicitly name alternatives or state when not to use this tool, so it stops short of a 5.

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/tiefeiyu/Portal'

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