Skip to main content
Glama

tab_click

Click a browser page element or canvas point with the real mouse, scrolling it into view and confirming pointer placement before clicking; fails if the element is covered.

Instructions

Click an element of a page in the user's browser with the real mouse. The tab is brought to the front, the element is scrolled into view if needed, and the pointer moves onto it and clicks once the page confirms the pointer is over it, so the browser window may sit anywhere on screen. Fails without clicking when something covers the element. Take the ref from tab_read. On a canvas page, click a point instead with x and y, read off tab_screenshot: the page confirms the pointer reached that point before the click. Returns what changed on the page (lines that appeared with +, went with -), or the new screen after a navigation, so a menu or dialog the click opened needs no tab_read; take a tab_screenshot when that leaves you unsure what happened. A download the click starts is saved where the browser's save dialog proposes, and the result names the file.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "tab_click"
  }
}

Input Schema

NameRequiredDescriptionDefault
xNoCSS pixels from the top-left corner of the viewport, for a page that draws on a canvas (a design tool, a map) and has no element to name: read the point off a tab_screenshot, scaling its pixels by the viewport width it reports divided by the image's width. Give x and y together, instead of a ref.
yNoCSS pixels from the top-left corner of the viewport, for a page that draws on a canvas (a design tool, a map) and has no element to name: read the point off a tab_screenshot, scaling its pixels by the viewport width it reports divided by the image's width. Give x and y together, instead of a ref.
refNoElement ref: the number in brackets in tab_read output, e.g. 12 for "[12] button". Refs stay valid while the element stays on the page.
tabIdNoTab id from tab_list or tab_read. Defaults to the active tab of the browser window the user used last.
buttonNoMouse button. Defaults to left.
waitForNoText the click makes appear after a load the page shows as loading, such as the button of an export being prepared: the result waits up to 30 seconds for it before reporting what changed.
modifiersNoModifiers held during the action: Shift, Alt (Option), Meta (Command), Control. E.g. ["Meta"] for a Cmd+click that adds to a selection, ["Alt"] for an Option-drag that duplicates in a design tool.
doubleClickNoDouble-click instead of a single click. Defaults to false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/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 and does: it discloses that the tab is brought to front, the element scrolled into view, the pointer confirmed over the target before clicking, and that the window may sit anywhere on screen. It also explains the failure mode (occluded element), the diff-style return (+/- lines, new screen after navigation), and that downloads land where the browser's save dialog proposes with the filename reported.

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?

Front-loaded with the action and its guarantees, then failure behavior, then input sourcing, then return shape — a sensible order. Some sentences are long and compound (the pointer/canvas sentence runs several clauses), but no sentence is filler.

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?

For an 8-parameter, zero-annotation mutation tool with no output schema, the description covers inputs, side effects, failure conditions, return format, and the download case. An agent has everything needed to call it correctly and interpret the result.

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%, and the description largely restates what the schema already documents for ref, x/y, and waitFor rather than adding new constraints or edge cases. Baseline 3 applies when the schema does the heavy lifting and the prose adds only marginal clarification.

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 and resource with scope: "Click an element of a page in the user's browser with the real mouse." The phrasing separates it from OS-level siblings like macos_mouse_click by anchoring to a browser page, and the canvas fallback is described in the same breath.

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?

Explicitly routes the agent: take the ref from tab_read, use x/y read off tab_screenshot on canvas pages, and take a tab_screenshot when the returned diff leaves you unsure. It also states the when-not case — the click fails without acting when something covers the element.

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