Skip to main content
Glama
yiwenlu66
by yiwenlu66

wait_for_shell_prompt

Waits for a shell prompt to appear in an active terminal session, returning any output until the prompt is detected or timeout is reached. Ensures the shell is ready for commands.

Instructions

Wait until a shell prompt is detected.

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

This repeatedly ingests new PTY output and re-runs prompt detection until a shell prompt is visible or until deadline_s expires. Any output consumed during that wait is returned in output.

If the remote shell uses a customized prompt that the default heuristics misclassify, set shell_prompt_regex via configure_session(...).

deadline_s must be at most 300 seconds.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
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 repeatedly ingests PTY output and re-runs prompt detection until deadline_s expires, and returns consumed output. It also notes the deadline_s maximum. This provides good transparency, though it could mention idempotency or side effects.

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 5 sentences covering purpose, prerequisites, behavior, customization, and constraints. No redundant information; every sentence adds value.

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?

For a simple wait tool with two parameters and no output schema, the description adequately covers core behavior, prerequisites, customization, and output format ('Any output consumed... is returned in output'). It lacks detail on return value structure but is sufficient for use.

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?

The schema describes deadline_s with bounds and default, and session_id is required. The description adds context about deadline_s's maximum (already in schema) and mentions configure_session for prompt customization, which is not a parameter. It doesn't add significant meaning beyond schema, and schema coverage is 50%.

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 'wait' and resource 'shell prompt', clearly stating the tool's purpose. It distinguishes from siblings like wait_for_output and wait_for_regex by specifying it waits for a shell prompt exclusively, and mentions prerequisites and customization.

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?

The description explicitly states the prerequisite of an existing session created via create_session, and advises how to handle custom prompts via configure_session. It provides clear context for when to use this tool, though it doesn't explicitly mention when not to use it.

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