Skip to main content
Glama

is_displayed

Checks whether a page element is visible using a selector, helping verify UI state before interactions or assertions.

Instructions

Check if an element is visible on the page.

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

Input Schema

NameRequiredDescriptionDefault
byNoStrategycss
timeoutNoSeconds
selectorYesLocator value

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.9.3
    • changedInput schema / properties / by / description
      Previous value: -"Locator strategy"New value: +"Strategy"
    • changedInput schema / properties / selector / description
      Previous value: -"CSS selector, XPath, or other locator value"New value: +"Locator value"
    • changedInput schema / properties / timeout / description
      Previous value: -"Wait timeout in seconds"New value: +"Seconds"
  2. First observedv0.3.7

TDQS

C2.6/5.0
Behavior2/5

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

With no annotations, the description carries the full burden and does not disclose whether the call blocks/polls up to the timeout, whether it returns a boolean or raises an error, or how hidden-vs-absent elements are treated. The single sentence leaves all failure and waiting behavior unknown, which for a visibility probe is the key behavioral question.

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?

A single short, front-loaded sentence with no filler or redundancy. It is efficient, though the brevity comes at the cost of the missing distinctions noted above rather than being a model of economical completeness.

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?

For a tool with no annotations and no output schema, the description should at minimum say what it returns and how it differs from the assertion siblings. Neither is present, so an agent cannot confidently choose it over assert_element_visible or predict its result shape.

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 all three parameters (by, timeout, selector) are documented structurally and the baseline of 3 applies. The description adds nothing beyond the schema — notably it does not clarify that timeout implies polling for visibility rather than a single instantaneous check.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Check if an element is visible on the page" gives a clear verb and resource, so the basic action is understandable. However, it does nothing to separate itself from the sibling tools assert_element_visible, assert_element_not_visible, and wait_for_element, which operate on the same concept. The distinction that matters most (boolean-returning check vs. assertion that fails) is left implicit.

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 instead of assert_element_visible / assert_element_not_visible, which are the obvious alternatives in the sibling list. A reader must guess whether this throws on failure, returns a boolean, or waits; the only hint is the timeout parameter in the schema.

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