Skip to main content
Glama

browser_click_element

Click web page elements using CSS selectors for reliable automation in Chrome. Combines element finding and clicking with perception verification to ensure stable interactions across page repaints.

Instructions

Find a DOM element by CSS selector and click it (combines browser_find_element + mouse_click in one step). Prefer over mouse_click for Chrome — selector-based clicking is stable across repaints. Pass lensId (from perception_register) to verify tab identity and readyState before clicking and receive post.perception state feedback without a screenshot. Caveats: Fails if the element is outside the visible viewport — scroll it into view with browser_eval("document.querySelector('sel').scrollIntoView()") first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorYesCSS selector for the target element (e.g. '#submit', '.btn', 'button[type=submit]').
narrateNoNarration level. rich includes UIA or browser state diff when supported.minimal
tabIdNoTab ID from browser_connect. Omit to use the first page tab.
portNoChrome/Edge CDP remote debugging port.
lensIdNoOptional perception lens ID. Guards (target.identityStable) are evaluated before clicking, and a perception envelope is attached to post.perception on success.
Behavior4/5

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

With no annotations provided, the description carries full burden and does well by disclosing key behavioral traits: it explains the tool combines two operations, mentions stability benefits ('stable across repaints'), describes the lensId verification mechanism ('verify tab identity and readyState'), notes the failure condition for elements outside viewport, and specifies that it provides 'post.perception state feedback without a screenshot.' It doesn't mention rate limits or auth needs, but covers most critical behaviors.

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?

The description is appropriately sized and front-loaded with the core purpose in the first sentence. Each subsequent sentence adds valuable information about preferences, verification mechanisms, and caveats. While slightly dense, all content earns its place without redundancy. Minor deduction for the somewhat complex caveat explanation.

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

Completeness4/5

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

For a tool with 5 parameters, 100% schema coverage, and no output schema, the description provides good contextual completeness. It explains the tool's composite nature, stability benefits, verification mechanism, and failure conditions. The main gap is lack of information about return values or error cases, but given the schema coverage and behavioral details provided, it's mostly complete.

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 the baseline is 3. The description adds some context about lensId ('Pass lensId... to verify tab identity and readyState before clicking and receive post.perception state feedback') which provides additional meaning beyond the schema's description. However, it doesn't elaborate on other parameters like selector format or narrate options, so it adds moderate value.

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 clearly states the tool's purpose: 'Find a DOM element by CSS selector and click it' with the specific verb 'click' and resource 'DOM element'. It explicitly distinguishes from sibling tools by mentioning it 'combines browser_find_element + mouse_click in one step' and advises to 'Prefer over mouse_click for Chrome', making the differentiation clear.

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 description provides explicit guidance on when to use this tool vs alternatives: 'Prefer over mouse_click for Chrome — selector-based clicking is stable across repaints.' It also specifies when not to use it: 'Fails if the element is outside the visible viewport' and provides an alternative action: 'scroll it into view with browser_eval(...) first.' This covers both positive and negative usage scenarios with clear alternatives.

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/Harusame64/desktop-touch-mcp'

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