Skip to main content
Glama

assert_not_visible

Verify an element is absent from the screen, returning an error if it appears. Use it to confirm UI elements are hidden or removed during mobile tests.

Instructions

Assert that an element is NOT currently visible on screen. Returns an error if the element IS 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

A4/5.0
Behavior3/5

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

No annotations are provided, so the description must carry the burden of behavioral disclosure. It does state that it returns an error if the element is found, which is a key behavior. However, it does not mention the type of error, the return value on success (e.g., a pass message), or the timeout behavior. For a simple assertion tool, this is reasonably transparent but incomplete for an agent expecting to handle outcomes.

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 sentences, each earning its place. The core purpose is stated first, and the key behavioral consequence (returns an error if found) is immediately captured. No filler or redundant phrasing, making it highly efficient.

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?

This is a simple tool with optional parameters and no output schema, so the description covers the essential purpose and key behavioral effect. The parameters are fully documented in the schema, so the agent can invoke it correctly. However, it doesn't specify the return type on success (e.g., a boolean true or a pass message), which is a minor gap for an agent that needs to interpret the result. But given the simplicity, the description is largely complete.

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?

The schema already documents all three parameters with examples and regex guidance, and with 100% coverage, the description adds nothing extra about parameter meaning. The description does not describe which combination of text and resource_id is required (e.g., AND/OR logic) or whether both can be used together. However, the schema alone is sufficient for basic parameter semantics.

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 that the tool asserts an element is NOT visible, which is distinct from its sibling assert_visible. It uses a specific verb ('Assert') and resource (element visibility), and the note about returning an error if found adds clarity. This is sufficient to distinguish it from assert_visible and other assertion tools.

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?

The description implies when to use it: when you expect an element to be absent, and it contrasts with assert_visible, but it doesn't explicitly state 'use assert_visible when you expect the element to be present' or list other alternatives. Sibling tools like is_element_visible and find_element exist, but no explicit routing guidance is given. This is clear context but no exclusions.

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