Skip to main content
Glama

element_action

Perform focus, highlight, or scroll-into-view actions on a web element. Use it to direct attention or prepare an element for interaction.

Instructions

Perform a simple positioning/emphasis action on an element. Raises an exception if the element isn't found within the default timeout. Args: action: 'focus' (move keyboard focus to it), 'highlight' (briefly flash it using JavaScript — useful for narrating actions on a visible/headed browser), or 'scroll_into_view'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionNofocus
selectorYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries the burden of behavioral disclosure. It reveals that focus moves keyboard focus, highlight flashes via JavaScript, scroll_into_view scrolls, and the operation fails with an exception on missing elements. This is strong behavioral coverage for a simple, non-destructive tool.

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?

The description is compact and well-structured: a one-line scope statement, a useful failure-mode sentence, then a clear Arg list. Every sentence earns its place, and there is no filler or redundant restatement of structured fields.

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

Completeness5/5

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

For a two-parameter, non-destructive action tool, the description covers the action semantics, the failure mode, and even a practical use case for highlight. An output schema exists for return values, so not detailing the return type in prose is appropriate. No obvious preconditions, security concerns, or hidden side effects are missing.

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

Parameters4/5

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

Schema description coverage is 0%, but the description compensates by defining each action enum value with concrete meaning in parentheses. The selector parameter is not explicitly described, but the term 'selector' plus the opening reference to 'an element' makes its role reasonably inferable. The default value 'focus' is left to the schema rather than repeated.

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 opens with a specific verb+object ('Perform a simple positioning/emphasis action on an element') and enumerates three concrete behaviors: focus, highlight, and scroll_into_view. It is clear what the tool does, though it does not explicitly differentiate itself from sibling tools like scroll or run_javascript.

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?

It provides useful context: 'highlight' is recommended for visible/headed browsers, and the tool raises an exception if the element isn't found within the default timeout. However, it does not state when to prefer this tool over alternatives such as scroll, click, or run_javascript, nor does it give explicit when-not-to-use guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/seleniumbase/seleniumbase-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server