Skip to main content
Glama
yiwenlu66
by yiwenlu66

wait_for_regex

Wait for a regex pattern to appear in terminal output, checking scrollback and live output within a configurable time limit.

Instructions

Wait for a regex match in rendered text and/or newly arriving PTY bytes.

Requires an existing session created via create_session(session_id, cwd).

This first checks already rendered scrollback, then waits on new PTY output.

deadline_s must be at most 300 seconds.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patternYes
deadline_sNoTotal wall-clock budget in seconds. Must be between 0 and 300.
session_idYes
Behavior4/5

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

With no annotations, the description discloses key behaviors: it checks scrollback first then waits on new output, and deadline_s is capped at 300s. It lacks detail on timeout behavior but is mostly 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?

The description is concise with 4 clear sentences, no redundant information, and well-structured.

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?

While it explains the process well, it omits what the tool returns (e.g., match details or timeout error) and doesn't fully compensate for the lack of output schema.

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 coverage is only 33% (only deadline_s has a description). The description adds context about the overall operation but doesn't explain the pattern parameter's syntax or session_id usage beyond what's in the 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 it waits for a regex match in rendered text and/or PTY bytes, distinguishing it from siblings like wait_for_output or wait_for_shell_prompt.

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?

It specifies prerequisite of an existing session and explains the order of checking scrollback then waiting. However, it doesn't explicitly contrast with alternatives or state when not to use.

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/yiwenlu66/PiloTY'

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