Skip to main content
Glama

repl_expect

Block automation until a prompt regex matches, session idles, or child process exits, enabling precise timing in mobile device interactions.

Instructions

Block until a prompt regex matches, the session idles, the child exits, or the timeout fires.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
regexNo
idleMsNo
timeoutMsNo
Behavior3/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 and the four termination conditions, which is helpful. However, it does not mention whether the tool is destructive, requires any specific session state, or what happens if the session is already closed. A 3 is appropriate as it provides some behavioral context but is not exhaustive.

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 a single sentence with no wasted words. It front-loads the core behavior ('Block until...'), making it easy to scan. Every part of the sentence carries essential information.

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

Completeness2/5

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

Given 4 parameters (1 required), no output schema, and no annotations, the description should explain what the tool returns, how to interpret the result (which event fired), and any state changes. It provides none of that. The tool has a potentially complex return behavior (return different data for each termination condition), which is left entirely unspecified.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for all 4 parameters. It only names the parameter 'regex' implicitly ('prompt regex'), but does not explain 'id', 'idleMs', or 'timeoutMs' meanings or formats. The default values in the schema help slightly, but the description adds almost no parameter-level detail.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool blocks until one of several events occurs (prompt regex match, session idle, child exit, timeout). This distinguishes it from siblings like repl_send (which sends input) or repl_snapshot (which captures state), though it could be more specific about the relationship to repl sessions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not explain when to use this tool versus alternatives like repl_send or repl_snapshot. For example, if a prompt is expected after sending input, an agent might not know to call repl_expect instead of just waiting. No prerequisites or exclusions are mentioned.

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/AlexGladkov/claude-in-mobile'

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