Skip to main content
Glama
xzaleksey

open-mobile-mcp

by xzaleksey

wait_for_log

Wait for a mobile log line to match a regex pattern or timeout, then return the match status, matched line, and elapsed time.

Instructions

Block until a log line matching a pattern appears, or timeout. Returns {matched, line, elapsed}.

ALWAYS use via background subagent — never call directly or it blocks the whole conversation:

  1. Spawn background subagent: 'Call wait_for_log(pattern, timeout). Report result.'

  2. Then perform the action (tap/navigate) in the main agent

  3. Main agent continues; subagent notifies when pattern matched

Spawn subagent BEFORE the action that triggers the log, not after.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceNoWhich log buffer to watch (default 'all')
patternYesRegex pattern to match against log lines (case-insensitive)
timeoutNoMax wait time in ms (default 60000). Use at least 60000 to account for subagent startup overhead.
deviceIdNoRestrict android/ios sources to this device's own log buffer.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.4

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It clearly warns that calling directly blocks the whole conversation, explains the asynchronous subagent pattern, and describes the timeout behavior and return value. This is strong, candid transparency about a potentially dangerous blocking operation.

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 front-loaded with the core behavior and return shape, then provides a compact numbered usage protocol. Every sentence earns its place; the repeated warning about spawning before the action is important enough to justify the slight redundancy.

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

Completeness5/5

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

The description covers the blocking behavior, the exact usage pattern, the ordering requirement, the return shape, and the timeout semantics. Combined with the fully described parameter schema, an agent has everything it needs to invoke this tool correctly in the intended async workflow.

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 description coverage is 100%, so the input schema already documents all four parameters, including defaults and usage notes like the 60000ms timeout recommendation for subagent startup. The main description adds operational context but does not add meaningful parameter-level meaning beyond what the schema already provides.

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 blocks until a matching log line appears or a timeout occurs, and explicitly lists the return shape. This distinguishes it from sibling log-retrieval tools like get_network_logs or get_bundler_logs, which fetch logs rather than wait on them.

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

Usage Guidelines5/5

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

The description gives explicit, actionable instructions: always use via a background subagent, never call directly, spawn the subagent before triggering the action, and then perform the action in the main agent. It also includes a concrete invocation example and a warning about ordering, leaving no ambiguity about when and how to use this tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.