Skip to main content
Glama

focus_on

Scroll to, focus, or highlight an element without clicking or typing. Use it to bring elements into view, prepare for keyboard input, or visually verify elements during debugging.

Instructions

Scroll to, focus, or highlight an element.

Use this tool when an element needs to be brought into view, focused for keyboard interaction, or highlighted for debugging/demonstration.

This tool does NOT click, type into, select from, hover over, or otherwise activate the element.

Args: selector: CSS selector or SeleniumBase selector identifying the target.

action:
    - "scroll_to_element": Scroll the page until the element is in
      the current viewport. This is the default action.
    - "focus": Move keyboard focus to the element.
    - "highlight": Temporarily highlight the element for debugging or
      demonstration. This can affect timing and may reduce stealth.

Tool selection: - Bring an element into view -> use focus_on with the default action. - Focus an element -> use focus_on(action="focus"). - Highlight element for debugging -> use focus_on(action="highlight"). - Click -> use click. - Type text into a text field -> use type_text. - Hover -> use hover_with_action.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionNoscroll_to_element
selectorYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Install Server

TDQS

A5/5.0
Behavior5/5

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

With no annotations, the description carries the full burden. It discloses the side effects of highlighting ('can affect timing and may reduce stealth'), the default scroll behavior, and explicitly states that it does not activate the element. This is comprehensive behavioral disclosure.

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 well-structured with clear sections (overview, purpose, args, tool selection). Every sentence carries value and there is no filler. The organization makes it easy for an agent to parse quickly.

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?

The description covers what, when, how, and the behavioral consequences. The output schema is present, so return values do not need description. The tool selection guidance provides full contextual completeness for correct invocation.

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

Parameters5/5

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

Schema description coverage is 0%, and the description fully compensates by explaining the 'selector' parameter and providing a detailed explanation of each enum value for 'action', including the default. This adds meaning far beyond the raw schema.

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 uses specific verbs ('Scroll to, focus, or highlight') tied to a clear resource ('an element') and explicitly lists what the tool does NOT do (click, type, select, hover). This sharply distinguishes it from sibling tools like click, type_text, and hover_with_action.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The dedicated 'Tool selection' section explicitly states when to use focus_on for each action and points to alternative tools for clicking, typing, and hovering. No inference is required.

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

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'

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