Skip to main content
Glama

Assert visible

assert_visible
Read-only

Verify an element is visible or hidden within a timeout during browser QA tests. Returns PASS or FAIL with a clear verdict, supporting CSS, text, role, and XPath selectors.

Instructions

Test assertion: PASS if the element is visible (or, with visible=false, hidden/absent) within the timeout, otherwise FAIL (isError).

Input Schema

NameRequiredDescriptionDefault
frameNoCSS selector of the iframe containing the element (e.g. "iframe[name^=__privateStripeFrame]"), or a list for nested iframes, outermost first. Not needed with aria-ref selectors.
labelNoName for this check in the test report, e.g. "Login shows welcome message"
timeoutNoTimeout in milliseconds
visibleNofalse asserts the element is hidden or absent
selectorYesSelector: "aria-ref=e5" from get_page_snapshot (preferred; also reaches into iframes), CSS ("#email", "button.submit"), text ("text=Sign in"), role ("role=button[name=/save/i]") or XPath ("xpath=//a")

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds genuinely new behavioral context beyond the annotations: the PASS/FAIL outcome model, the timeout window, and critically that failure surfaces as isError. That failure-signaling detail is valuable and not in the annotations.

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?

A single, front-loaded sentence that delivers the core semantics (pass condition, the visible=false inversion, timeout, fail signaling) with zero filler. The parenthetical is well-used to pack the edge case efficiently.

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?

For a single-assertion tool with full annotations and a 100%-covered schema, the description conveys everything needed to invoke it correctly, including the failure mode. No output schema exists but the description states the return semantics (PASS / isError). Minor absence of explicit 'when to use vs wait_for' keeps it just under top marks.

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 parameters (frame, label, timeout, visible, selector) are already documented in the schema itself. The description restates the visible=false inversion behavior and timeout, which mirrors the schema rather than adding new syntax or edge-case meaning. Baseline 3 is appropriate.

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: it asserts element visibility, with pass/fail outcomes spelled out. It's clearly distinguishable from the sibling assert_text (which checks text content) and wait_for (which just waits). An agent can tell exactly what this does without opening the schema.

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

Usage Guidelines3/5

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

The 'Test assertion' framing implies this belongs in a test/verification context, contrasted implicitly against the action tools (click, fill) in the sibling list. However, it never explicitly says when to prefer this over wait_for or assert_text, nor any exclusions. Usage is implied rather than stated.

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