Skip to main content
Glama
Browser Session MCP

Browser Session MCP

click

Destructive

Simulates a trusted mouse press in the active tab using a CSS selector, viewport coordinates, or a plain-language target, firing page handlers and enabling popups reliably.

Instructions

Click in the session's active tab with real CDP mouse input (trusted events — fires handlers reliably and grants user activation, so it can open popups/new tabs that a JS click can't). Pass a CSS selector to click the first match's center, after waiting up to timeout for it and scrolling it into view. Plain language works too: a jev: prefix (e.g. jev: the login button) goes straight to the Jev decision model, and with TYPESAFE_API_KEY configured on the server any selector that matches nothing as CSS is retried as a plain-language goal the same way — the server sends the page's interactive elements to Jev, which picks one (on low confidence or any Jev problem it errors instead of guessing, so nothing is clicked blindly; elements are picked from the page as it is at call time, so wait_for content first if the page is still loading). Or pass both x and y to click viewport coordinates, which are used only when there is no selector. Don't use evaluate to click: synthetic JS clicks can be ignored by pages. Coordinates outside the viewport are not rejected; the click lands on nothing. A click can submit forms or trigger purchases, like a real user's. Returns a confirmation naming what was clicked, and rejected: fields the page refused during the click with their messages (a required field left empty, or the page's own error text), when a form wasn't sent. Fails if the selector matches nothing within timeout and Jev can't (or isn't configured to) resolve it, or if neither a selector nor both coordinates are given.

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>"
    },
    "name": "click"
  }
}

Input Schema

NameRequiredDescriptionDefault
xNoHorizontal viewport coordinate in CSS pixels, used with `y` when no selector is given.
yNoVertical viewport coordinate in CSS pixels, used with `x` when no selector is given.
timeoutNoMilliseconds to wait for `selector` to appear. Default 5000.
selectorNoCSS selector of the element to click; the first match is used. Or describe the element in plain words — `jev:<goal>` (e.g. `jev: the login button`) goes straight to the Jev decision model, and when TYPESAFE_API_KEY is set a selector that matches nothing as CSS is retried as such a description.
sessionIdYesThe id returned by open_browser_session. Errors if no open session has it.

Output Schema

NameRequiredDescriptionDefault
hitNoWhat was at the clicked or tapped point.
urlYesThe page's URL after the action.
titleYesThe page's title after the action.
dialogNoAn open dialog's text, if one is showing.
changedNoA field `type` filled that the page changed once focus left it (a date that reformats or reverts on blur), with both texts.
focusedYesThe element with keyboard focus, or "nothing".
optionsNoThe options of a dropdown or list open after the action (the one the focused field controls, else any showing), up to 50: pick one with select_option or click.
answeredNoThe page's own dialogs (alert, confirm, prompt, "Leave site?") answered since the last action, each accepted.
rejectedNoFields the page rejected during the action, each with its message: the browser's own form check (a required field left empty), or the page marking them invalid. The form wasn't sent while any remain.
navigatedYesWhether the URL changed.
focusTrailNoWith press_key's `repeat`: the focused element after each press.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.23
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "properties": {
      +    "answered": {
      +      "description": "The page's own dialogs (alert, confirm, prompt, \"Leave site?\")\nanswered since the last action, each accepted.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "changed": {
      +      "description": "A field `type` filled that the page changed once focus left it (a\ndate that reformats or reverts on blur), with both texts.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "dialog": {
      +      "description": "An open dialog's text, if one is showing.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "focusTrail": {
      +      "description": "With press_key's `repeat`: the focused element after each press.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": [
      +        "array",
      +        "null"
      +      ]
      +    },
      +    "focused": {
      +      "description": "The element with keyboard focus, or \"nothing\".",
      +      "type": "string"
      +    },
      +    "hit": {
      +      "description": "What was at the clicked or tapped point.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "navigated": {
      +      "description": "Whether the URL changed.",
      +      "type": "boolean"
      +    },
      +    "options": {
      +      "description": "The options of a dropdown or list open after the action (the one the\nfocused field controls, else any showing), up to 50: pick one with\nselect_option or click.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": [
      +        "array",
      +        "null"
      +      ]
      +    },
      +    "rejected": {
      +      "description": "Fields the page rejected during the action, each with its message:\nthe browser's own form check (a required field left empty), or the\npage marking them invalid. The form wasn't sent while any remain.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "title": {
      +      "description": "The page's title after the action.",
      +      "type": "string"
      +    },
      +    "url": {
      +      "description": "The page's URL after the action.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "url",
      +    "title",
      +    "navigated",
      +    "focused"
      +  ],
      +  "type": "object"
      +}
  2. Changed1 schema field changedv0.1.14
    • changedInput schema / properties / selector / description
      Previous value: -"CSS selector of the element to click; the first match is used."New value: +"CSS selector of the element to click; the first match is used. Or describe the element in plain words — `jev:<goal>` (e.g. `jev: the login button`) goes straight to the Jev decision model, and when TYPESAFE_API_KEY is set a selector that matches nothing as CSS is retried as such a description."
  3. Changed5 schema fields changed
    • addedInput schema / properties / selector / description
      Added value: +"CSS selector of the element to click; the first match is used."
    • addedInput schema / properties / sessionId / description
      Added value: +"The id returned by open_browser_session. Errors if no open session has it."
    • addedInput schema / properties / timeout / description
      Added value: +"Milliseconds to wait for `selector` to appear. Default 5000."
    • addedInput schema / properties / x / description
      Added value: +"Horizontal viewport coordinate in CSS pixels, used with `y` when no selector is given."
    • addedInput schema / properties / y / description
      Added value: +"Vertical viewport coordinate in CSS pixels, used with `x` when no selector is given."
  4. First observedv0.1.2

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only flag destructive/openWorld; the description adds substantive context the agent cannot get elsewhere: trusted CDP events grant user activation and can open popups, a click 'can submit forms or trigger purchases,' out-of-viewport coordinates silently land on nothing, and low-confidence Jev resolution errors rather than guessing. It also describes the `rejected` return field and the exact failure conditions, well beyond what the annotations disclose.

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?

Content is front-loaded correctly — trusted-input rationale first, then input modes, then caveats, then failures. However it is delivered as one very dense paragraph with several nested parentheticals and a long run-on final sentence, which makes it harder to scan than the complexity warrants.

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?

Covers every decision an agent must make for a mutation tool: input precedence, fallback/dependency on server config, timing behavior, risk of real side effects, and failure modes. An output schema exists, and the description still summarizes the confirmation and `rejected` payload, so nothing material is missing.

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% and the schema already documents x/y pairing, the `timeout` default, the `jev:` prefix, and sessionId provenance. The description mostly restates these, adding only the precedence rule (coordinates used only when no selector) and the combined failure condition, so it sits at the baseline rather than meaningfully enriching parameter meaning.

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?

Opens with a specific verb and mechanism: 'Click in the session's active tab with real CDP mouse input.' It immediately distinguishes itself from sibling `evaluate` by explaining why a JS click is inferior (synthetic events can be ignored), so an agent can choose between them 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?

Gives explicit routing rules across all three input modes: selector when you know the CSS, `jev:` prefix for plain language, bare x/y when there is no selector, and notes coordinates are only consulted absent a selector. It also names exclusions — 'Don't use evaluate to click' and 'wait_for content first if the page is still loading' — which is exactly the when/when-not/alternative coverage the dimension asks for.

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