Skip to main content
Glama
isina-nej
by isina-nej

Wait on terminal

terminal_wait
Read-only

Wait until a terminal process matches a regex, exits, or times out. Use to pause execution until a specific output appears or a command completes.

Instructions

Block until regex pattern appears in new output, process exits, or timeout.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patternNo
wait_exitNo
session_idYes
timeout_secondsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.8.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations declare readOnlyHint=true and openWorldHint=false, and the description does not contradict them — 'Block' is a read/wait operation with no mutation. The description adds genuine value beyond annotations by disclosing the blocking semantics, the three termination conditions, and that the regex matches only 'new output' (not accumulated history). It stops short of explaining timeout failure behavior, but the safety profile is already covered by annotations.

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 tightly worded sentence front-loads the blocking action and lists all three termination conditions with zero wasted words. Every element earns its place; no filler or redundancy.

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

Completeness3/5

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

The description covers the core behavior and, since an output schema exists, return values needn't be explained. However, it leaves ambiguous how pattern and wait_exit interact when both are set (the 'or' phrasing implies any condition suffices but doesn't state priority), what happens on timeout, and what 'new output' precisely means relative to prior reads. Adequate but with notable gaps for a blocking operation.

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?

With schema description coverage at 0%, the description carries the explanatory burden and does clarify three of four parameters: pattern (regex), wait_exit (process exits), and timeout_seconds (timeout). However, session_id is never mentioned, though its purpose is reasonably inferable from the name 'Session Id'. The description compensates for the coverage gap only partially.

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 uses a specific verb ('Block') with a clear resource and the exact conditions that end the wait: regex match on new output, process exit, or timeout. It clearly distinguishes from siblings like terminal_read (polling read), terminal_write (sending input), and job_wait (waiting on jobs, not terminal sessions). Not a tautology; it states precise behavior.

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?

The description implies usage — you block after running a command when you need to synchronize on output or process completion. However, it does not explicitly differentiate from similar waiting tools like job_wait or accounts_wait, nor does it advise when to wait vs. poll with terminal_read. The context is implied but no exclusions or alternatives are named.

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

Deploy Server

Other Tools