Skip to main content
Glama

Element Info

element_info

Retrieve an element's text, attributes, bounding box, visibility, and enabled state by CSS selector or other locator to inspect page state and diagnose UI issues.

Instructions

Return text, attributes, bounding box, visibility, and enabled state for an element.

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

Input Schema

NameRequiredDescriptionDefault
pageIdNoPage id. Defaults to the active page.
selectorYesCSS selector, text=..., role=button[name="Save"], testid=..., xpath=..., or label=...

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

No annotations exist, so the description carries the full behavioral burden. It does disclose the return payload contents, which is genuine value, but omits key behavior: what happens if the selector matches nothing (error vs empty result), whether it waits for the element, and whether it queries a specific page context by default.

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?

One front-loaded sentence with no filler; the returned fields are listed immediately so the agent knows the payoff without reading further.

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?

With no output schema, listing the returned fields is important and it is done. But for a selector-driven inspection tool, the failure mode (missing element), waiting behavior, and interaction with pageId are all unstated, leaving real gaps for correct invocation.

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% and both parameters (pageId with its active-page default, selector with its five supported syntaxes) are already documented in the schema. The description adds no parameter meaning beyond that, so the baseline 3 applies.

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 uses a specific verb ('Return') plus a named resource (an element) and enumerates the exact fields returned: text, attributes, bounding box, visibility, enabled state. That is far more concrete than the tool name alone, though it never contrasts itself with snapshot or assert, so an agent must infer the boundary.

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 when-to-use guidance, no exclusions, and no mention of alternatives such as snapshot (page-wide inspection) or assert (verification). The read-only inspection intent is only implied by 'Return'.

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