Skip to main content
Glama

assert_visible

Read-onlyIdempotent

Checks whether an element matching a selector is visible and returns a pass/fail result without throwing, so agents can verify page state without stopping the flow.

Instructions

[Agent Browser] Check if an element is visible (never throws). Returns {success: true, data: {visible: true/false}} with [PASS]/[FAIL] in message. Use for verification without breaking the flow on failure.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "selector": "<selector>"
    },
    "name": "assert_visible"
  }
}

Input Schema

NameRequiredDescriptionDefault
selectorYes

Output Schema

NameRequiredDescriptionDefault
dataNo
hintsNo
messageNo
successNo
suggestionsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, and non-destructive, so the safety bar is met. The description adds genuinely non-structured behavior: it never throws, and it encodes pass/fail in the message with [PASS]/[FAIL]. The return-value detail duplicates the output schema, which trims some credit.

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?

Three short lines, purpose first, then return shape, then usage guidance — well front-loaded and free of filler. The return-shape sentence slightly restates what the output schema already provides, so it is not maximally tight.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The output schema covers return values and annotations cover the safety profile, so the remaining burden is selector semantics, which is left unaddressed. Adequate for a one-parameter assertion helper, but the ambiguity about how a selector is resolved is a real gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There is a single required parameter with 0% schema coverage, so the description carries full responsibility — yet it says nothing about selector syntax (CSS, XPath, text match, shadow DOM piercing) or whether visibility accounts for opacity/offscreen. For an element-targeting tool this is a meaningful gap.

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 states a specific verb and resource ('Check if an element is visible'), which cleanly separates it from siblings like assert_text and assert_url that target different assertion subjects. It stops short of explicitly contrasting against those siblings, but the noun 'visible' is unambiguous.

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?

'Use for verification without breaking the flow on failure' gives a clear positive use case, and 'never throws' implicitly contrasts it with throwing assertion styles. There is no explicit when-not guidance (e.g., use assert_text when checking content), but the selection signal is adequate.

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