Skip to main content
Glama

Click in browser

browser_click
Destructive

Click an element by index from a browser snapshot or at given x/y coordinates in an agent tab. Use for background tabs; snapshot first because clicks can submit forms or open links.

Instructions

Click in one of the agent's tabs, either an element by its index from browser_snapshot (preferred) or a point given in page coordinates. Pass index or x and y, not both. Works on a background tab. Use click for native app windows. A click can submit forms or follow links, so snapshot first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xNoPage x coordinate in CSS pixels, used together with y when no index is given
yNoPage y coordinate in CSS pixels, used together with x when no index is given
indexNoElement index from the latest browser_snapshot of this tab. Preferred over coordinates.
tab_idYestab_id of one of the agent's tabs, from browser_open_tab or browser_list_tabs
session_idNoStable task or thread ID. Pass the same value on every browser call for this task. Different IDs isolate tabs and cleanup within one MCP process. Omit for the default process session.
return_stateNoAfter acting, wait for the page to settle (and finish loading, if the action navigated) and append a fresh browser_snapshot of this tab, so you can pick the next index in the same call. Its indices replace earlier ones.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.2
    • addedInput schema / properties / return_state
      Added value: +{
      +  "description": "After acting, wait for the page to settle (and finish loading, if the action navigated) and append a fresh browser_snapshot of this tab, so you can pick the next index in the same call. Its indices replace earlier ones.",
      +  "type": "boolean"
      +}
  2. Changed1 schema field changedv0.4.3
    • addedInput schema / properties / session_id
      Added value: +{
      +  "description": "Stable task or thread ID. Pass the same value on every browser call for this task. Different IDs isolate tabs and cleanup within one MCP process. Omit for the default process session.",
      +  "maxLength": 128,
      +  "minLength": 1,
      +  "type": "string"
      +}
  3. Changed4 schema fields changedv0.3.1
    • changedInput schema / properties / index / description
      Previous value: -"Element index from browser_snapshot"New value: +"Element index from the latest browser_snapshot of this tab. Preferred over coordinates."
    • addedInput schema / properties / tab_id / description
      Added value: +"tab_id of one of the agent's tabs, from browser_open_tab or browser_list_tabs"
    • addedInput schema / properties / x / description
      Added value: +"Page x coordinate in CSS pixels, used together with y when no index is given"
    • addedInput schema / properties / y / description
      Added value: +"Page y coordinate in CSS pixels, used together with x when no index is given"
  4. First observedv0.3.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover the risk profile (destructiveHint=true, openWorldHint=true, non-idempotent, not read-only), so the bar is lower. The description still adds real context beyond them: it works on background tabs, clicks can cause navigation/form submission, and the snapshot indices get replaced after a state refresh.

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?

Four tight sentences, front-loaded with the primary addressing mode (index) before the fallback (coordinates), then the exclusivity rule, then the side-effect warning. No sentence is filler.

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 mutating, open-world click tool with no output schema, the description covers targeting, exclusivity, background-tab behavior, the sibling alternative, and the side-effect hazard. It could say slightly more about what return_state yields, though the schema already explains that.

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 coverage is 100%, so every parameter is already documented in the schema, giving a baseline of 3. The description adds one genuinely new constraint the schema lacks — 'Pass index or x and y, not both' — but otherwise restates what the schema already says about index vs. coordinates.

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?

States a precise verb (click) and resource (agent's browser tab), and explicitly delimits itself from the sibling `click` tool ('Use click for native app windows'). An agent can distinguish it from right_click/hover and from the native-app click without opening a schema.

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?

Gives explicit routing: prefer the `index` from browser_snapshot over raw coordinates, use the sibling `click` for native app windows, and 'snapshot first' because a click can submit forms or follow links. It also notes it works on a background tab, which is a non-obvious usability fact.

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