Skip to main content
Glama

Check or wait for an element

check_element
Read-only

Verify or wait for a mobile UI element state—exists, absent, text, enabled, checked, focused, or moves—without interacting, using an optional timeout and inverted expectation.

Instructions

Assert or wait for an element, touching nothing: check exists, absent, text (equals), enabled, checked, focused, moves; expect: false for the opposite. timeoutMs (at most 15000) waits until it holds. Returns one line, or fails with CHECK_FAILED saying what it found. Whole screen: check_screen; look only: read_screen.

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": "check_element"
  }
}

Input Schema

NameRequiredDescriptionDefault
refNo
readNo
checkNoexists
equalsNo
expectNo
selectorNo
timeoutMsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.1.4

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, and "touching nothing" is consistent with that while reinforcing the non-mutating contract. The description adds real value beyond the annotations: the 15000ms timeout cap, the one-line return shape, and the CHECK_FAILED failure mode that names what it found. It stops short of explaining how the read modes (diff/full/none) shape the returned output.

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?

Dense, semicolon-structured, and front-loaded with the core action before alternatives and timeout behavior. The telegraphic style saves space but risks being parsed as terse shorthand; every clause still carries information, with no filler.

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?

With no output schema, the description helpfully states the one-line success result and the CHECK_FAILED failure, which is sufficient for an agent to interpret outcomes. For a 7-parameter tool with a nested selector and an unexplained read enum, it is close to complete but not fully so.

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 coverage is 0%, so the description must carry parameter meaning, and it covers check predicates, equals-for-text, expect=false as the inverse, and the timeoutMs ceiling. However, ref, the read enum (diff/full/none), and the nested selector fields (id, role, text, index) receive no explanation anywhere, leaving several parameters ambiguous.

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 (assert or wait) and resource (an element), enumerates the exact check predicates (exists, absent, text, enabled, checked, focused, moves), and explicitly separates itself from check_screen and read_screen. An agent can distinguish it from siblings 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 Guidelines5/5

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

Explicitly routes the agent: use check_screen for the whole screen and read_screen for looking only, making the boundary between asserting an element and observing the screen unambiguous. It also states the timeoutMs condition (waits until the predicate holds), which is the main behavioral choice an agent must make.

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