Skip to main content
Glama

screen.waitFor

screen_waitFor

Waits for a UI element to appear or disappear on screen, optionally scrolls it into view, and reports near matches if the timeout is reached.

Instructions

Wait until a target is on screen, or gone with {gone:true}. Matches testID, label, placeholder, then the same joined text screen.snapshot shows. {scroll:true} also accepts a match rendered off screen and scrolls it into view, (it does not page lists for rows they have not rendered: wait for the list, then press/fill/setValue with {scroll:true}; not with gone). Default timeout 5000 ms; a timeout lists near misses.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "screen_waitFor"
  }
}

Input Schema

NameRequiredDescriptionDefault
argsNoThe tool's arguments, in order (each any JSON value). Leave out for none.
fullNoReturn a result over 32 KB whole instead of a summary of its size and shape.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.2

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and largely does: it declares the default timeout (5000 ms), states that a timeout produces a list of near misses, and discloses the scroll limitation around unrendered list rows plus the scroll-with-gone incompatibility. What it omits is whether the match is exact vs. substring/prefix, and whether the call throws or returns a negative result on timeout.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core purpose and no filler sentences; every clause carries information. It is written as one long sentence with stacked parentheticals, which makes the list/scroll caveat harder to parse on first read, but nothing is redundant.

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?

No output schema and no annotations, so the description must cover behavior itself, and it does for timing, failure reporting, and the scroll interaction. The remaining gap is what a successful wait yields (presumably a handle reusable by screen_press/screen_fill), which the agent would want to know before chaining calls.

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 nominally 100%, but that coverage only describes generic 'args' (an ordered array of any JSON) and 'full'; the real option vocabulary — {gone:true}, {scroll:true}, and the timeout override — lives entirely in the description. That is meaningful added semantics, though the shape of the target argument itself (string vs. object with per-matcher keys) is still not spelled out.

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?

States a specific verb and resource — wait until a target is on screen, or absent with {gone:true} — and pins down the matcher order (testID, label, placeholder, then the joined text that screen.snapshot exposes). That is enough for an agent to tell this apart from screen_findText, screen_snapshot or screen_scroll without opening any schema.

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?

Gives concrete when-to guidance for the tricky case: {scroll:true} accepts off-screen matches and scrolls them into view, but it does not page a list for unrendered rows, so the agent should wait for the list first and then call press/fill/setValue with {scroll:true}, and specifically not combine scroll with gone. It lacks an explicit rule for when to prefer screen_findText or screen_snapshot over waiting, so it stops short of full alternative routing.

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