Skip to main content
Glama
sandbanks

Agentic_SSH

wait_for_log_pattern

Blocks and streams remote logs (file or Docker) on single or multiple hosts until a regex pattern matches, helping verify events across nodes without polling.

Instructions

Blocks and streams a remote log file or Docker container logs on a single host ('host') or multiple hosts concurrently ('hosts') until a regex 'pattern' is matched or a timeout is reached. If using 'hosts', returns a JSON map of hostnames to success/error/timeout statuses containing the matched line. Extremely useful for verifying startup or events across cluster nodes without polling.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostNoThe target hostname or IP address
hostsNoA list of hostname targets to query concurrently
patternYesRegex pattern to match
containerNoThe Docker container name or ID to stream (provide either file_path or container)
file_pathNoAbsolute path to log file on remote target (provide either file_path or container)
timeout_secsNoMaximum time to block (default: 60)
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses blocking behavior, timeout, multi-host concurrency, and return format (JSON map of statuses). It does not cover auth or side effects, but these are less critical for a blocking tool.

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 two sentences with zero waste. The first sentence defines core functionality; the second adds use case and return info. It is front-loaded and efficient.

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?

Given the complexity (6 params, 1 required, no output schema), the description covers key aspects: blocking, pattern, timeout, host/hosts, container/file alternative. It could mention timeout default explicitly, but overall it is fairly complete.

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 coverage is 100%, so the baseline is 3. The description adds value by explaining the behavioral difference between 'host' and 'hosts' and the return format for multi-host queries, which goes beyond the schema's parameter descriptions.

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 function: blocks and streams remote log files or Docker container logs until a regex pattern is matched or timeout, with support for single or multiple hosts. This distinguishes it from sibling tools like tail_log and tail_container_logs.

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 tool is 'extremely useful for verifying startup or events across cluster nodes without polling', providing clear context for when to use it. However, it does not explicitly name alternative tools that might be used instead.

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/sandbanks/agentic_ssh'

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