Skip to main content
Glama

assert_visible

Verifies that a UI element is visible on screen during mobile tests, returning an error when it is not found. Supports matching by text, resource ID, or regex.

Instructions

Assert that an element is currently visible on screen. Returns an error if the element is NOT found.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNoVisible text or content-desc; regex full-match — use .* for partial, e.g. 'Sign.*'
device_idNoTarget device ID. If omitted, uses the default device.
resource_idNoBare resource-id, e.g. login_button; regex full-match

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.8.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description must carry the full behavioral burden. It discloses an error when the element is not found, but leaves undefined what happens when the element exists but is not visible, despite 'visible' being the core concept. It also does not state whether the check is immediate or has a timeout, which matters given the wait_for_element sibling.

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?

Two short sentences with no filler. The primary assertion is front-loadedтное and the error condition is stated immediately, making the tool's purpose easy to scan.

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?

No output schema and no annotations mean the description should clarify success returns and ambiguous invocation cases. It does not say what a successful assertion returns, and because all parameters are optional in the schema, it does not warn that some locator is still needed. The distinction between 'not found' and 'not visible' is also unresolved, leaving an agent without enough information to confidently invoke the tool.

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 schema already explains text, resource_id, and device_id including regex semantics. The description adds no parameter-level meaning beyond referring to 'an element', so the baseline score of 3 is appropriate.

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 action ('Assert') and the target condition ('element is currently visible on screen'), and it identifies the failure mode (returns an error if not found). It does not explicitly contrast with siblings like assert_not_visible or is_element_visible, so it stops short of full differentiation.

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?

There is no guidance on when to use this tool versus alternatives such as is_element_visible, wait_for_element, or assert_not_visible. No conditions, exclusions, or when-not-to-use guidance is provided; only the word 'assert' weakly implies a validation context.

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