Skip to main content
Glama

Click element

browser_click
Destructive

Click a semantic element from the latest observation. Required: sessionId, observationId, elementId (the element's id from browser_observe). Optional button: left (default), middle, or right (contextmenu). Uses the DOM click() path; events are not isTrusted. File pickers and similar APIs return ELEMENT_NOT_INTERACTABLE — the human must click. If the click opens a JavaScript alert, confirm, or prompt, it returns promptly with dialog: { type, message, pending: true } and the dialog stays open until browser_handle_dialog or the 30s timeout. Another click, type, or navigation while it is open returns DIALOG_PENDING. A successful click, type, select, press_key, scroll, or navigate invalidates that observationId; reuse returns STALE_OBSERVATION — observe again. A second action on the same session waits up to 5s for the first to finish, then runs. That wait is a per-session FIFO stored with the session, so it still holds when calls land on different server instances. If that wait times out, the call returns BUSY with retryAfterMs. STALE_OBSERVATION means the page changed — observe again. Do not omit observationId. Clicks are paced; RATE_LIMITED means wait retryAfterMs. On a sensitive site the click waits for human Approve in the extension (APPROVAL_REQUIRED, recoverable). Approve runs that click once. The completed success includes that same approvalId and approved: true. A click that did not need approval does not include approvalId. Deny is APPROVAL_DENIED (not recoverable), once per denied grant, not a block until a later Approve. The next click returns that approvalId even when the observation id and element id changed. A different tool is not that denial. A later click may ask again. Turning Sensitive site off cancels pending sensitive-site approvals, and the next call is not APPROVAL_EXPIRED from one of those rows. While that action is waiting, observe/screenshot/wait/get_status/release_control and other same-origin actions on allowed origins still work; retrying the same pending action returns APPROVAL_PENDING. Cancel with browser_cancel_approval. A pending approval expires after ~2 minutes. The next call for that same action or idempotency key returns APPROVAL_EXPIRED (recoverable) with the old approvalId and hint "retry to request a new approval". The retry after that creates a new APPROVAL_REQUIRED. Read one row with browser_get_approval. That wait is not CHALLENGE_DETECTED. Do not retry through CHALLENGE_DETECTED.

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": {
      "sessionId": "<sessionId>",
      "observationId": "<observationId>",
      "elementId": "<elementId>"
    },
    "name": "browser_click"
  }
}

Input Schema

NameRequiredDescriptionDefault
buttonNo
elementIdYes
sessionIdYes
observationIdYes
idempotencyKeyNoA key replays the original result only within ~60 seconds of the first call, only for the same Mcp-Session-Id, the same credential (API key or OAuth token), the same browser session, and the same tool. After the window, or under a different session/credential/tool, the call executes and bills normally. Reusing a key with different arguments returns IDEMPOTENCY_KEY_REUSED and is not executed or billed. Refusals (e.g. NO_HISTORY_ENTRY) are not cached, so the same key re-executes once state changes. A key passed in _meta is ignored.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Far beyond the annotations: discloses that events are not isTrusted, that file pickers fail with ELEMENT_NOT_INTERACTABLE, that dialogs return pending:true and block further actions with DIALOG_PENDING, the exact staleness invalidation rule (STALE_OBSERVATION), the 5s per-session FIFO with BUSY/retryAfterMs, rate-limit pacing, and the full approval lifecycle including APPROVAL_EXPIRED timing. Annotations (destructiveHint, openWorldHint, idempotentHint=false) are consistent with the described side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the essentials, but the body is a dense ~350-word block interleaving approval lifecycle, idempotency, and dialog rules with repetitive restatements ('observe again', 'STALE_OBSERVATION' re-explained, approval row details better suited to browser_get_approval). It is informative but poorly structured and heavy for a click tool.

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 destructive, open-world action with no output schema and 20% schema coverage, the description covers failure modes and success signals (approvalId, approved:true) in unusual depth. Minor gaps remain: the general shape of a successful non-approval result and the meaning of sessionId are not spelled out.

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 coverage is only 20%, so the description carries the load: it explains the origin of elementId, the default and semantic meaning of the button enum (right = contextmenu), and the consequences of a stale observationId. sessionId and idempotencyKey semantics are left to the schema (idempotencyKey does have a schema description), so it stops short of full coverage.

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 specific verb (click) and resource (a semantic element from the latest observation), and immediately ties elementId to browser_observe so the agent knows the prerequisite sibling. Distinguishable from browser_hover, browser_press_key, and browser_type without opening schemas.

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?

Explicit about required state (observationId must not be omitted, stale means observe again), about the non-interactable file-picker case (human must click), about which sibling to call for dialogs (browser_handle_dialog) and approvals (browser_cancel_approval, browser_get_approval), and about not retrying through CHALLENGE_DETECTED. Multiple when-to-use / when-not-to-use rules with named alternatives.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.