Skip to main content
Glama
faizbawa

mcp-remote-ssh

ssh_shell_wait

Hold execution until shell output contains a specified pattern or becomes stable, then return the output. Useful for synchronizing with long-running remote commands.

Instructions

Wait for the shell output to contain a specific pattern, or for the output to stabilize (no new output for two poll intervals). Useful for waiting on long-running commands to complete.

Args: session_id: The session ID returned by ssh_connect. pattern: Text pattern to wait for (e.g. a shell prompt like "$ " or "# "). If empty, waits for output to stabilize. timeout: Maximum seconds to wait (default: 300). poll_interval: Seconds between polls (default: 2.0). lines: Number of tail lines to return (default: 100).

Returns: Shell output when the pattern is found or output stabilizes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idYes
patternNo
timeoutNo
poll_intervalNo
linesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations are provided, so the description carries full burden. It discloses stabilization behavior (no new output for two poll intervals) and all parameters. It lacks details on timeout behavior (e.g., error vs empty result) but is otherwise 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 and front-loaded, stating the main purpose in the first sentence. Parameter details are listed cleanly with defaults. No unnecessary text.

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 core behavior and all parameters. With an output schema present (though not shown), the description appropriately omits detailed return format. It is complete for a wait tool, though missing edge-case handling (e.g., invalid session).

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 input schema has 0% description coverage, so the description is essential. It explains every parameter: session_id (from ssh_connect), pattern (empty = wait for stabilize), timeout (max seconds), poll_interval, and lines (tail lines to return). This adds full semantic 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 clearly states the tool's purpose: waiting for shell output to contain a specific pattern or for output to stabilize. The verb 'wait' combined with the resource 'shell output' is specific and distinct from sibling SSH tools.

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 mentions it is 'useful for waiting on long-running commands to complete,' which implies a use case. However, it does not explicitly contrast with alternatives like ssh_shell_read or ssh_execute, nor does it provide when-not-to-use guidance.

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/faizbawa/mcp-remote-ssh'

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