Skip to main content
Glama

Click an element

qa_click

Clicks page elements by snapshot ref, CSS selector, or accessible name, then returns what changed or the new URL so you can verify the action without taking another snapshot.

Instructions

Click an element on the page under test — by a qa_snapshot ref, by a CSS selector, or by the control's accessible name (the one to use right after a fill, since filling re-renders the step and staleness is what makes a ref refuse). Sends the full pointer sequence (pointerdown → mouseup → click), so component libraries that listen for pointerdown — Radix, shadcn, MUI — react to it like a real click. Scrolls the element into view first, and refuses a target that matches nothing or has zero size rather than silently doing nothing. Returns what the click CHANGED — what appeared, disappeared or updated once the page settled — so you do not need a follow-up qa_snapshot to find out whether it did anything. changed: null means the page did not move, which is itself the answer. On a recent extension build the reply also carries announced — what the page's live regions (aria-live / role=status / role=alert) actually spoke during the settle window, or null if they stayed silent: a toast that appeared in changed but not in announced is invisible to a screen reader (WCAG 4.1.3). AND WHEN THE PRESS NAVIGATED there is no diff to give: the reply carries navigated: <the new url> instead. That IS what the press did — do not press again, a second one would land on the NEXT page rather than repeat this one. BEFORE READING AN EMPTY DIFF AS A DEAD CONTROL, look for tab in the reply: it is there only when this tab was not in front, and state: "hidden" means Chrome had stopped painting it, so a popover could not render and nothing on an animation frame ran. Call qa_focus_tab and click again rather than filing anything. Requires the one-time “Agent control” confirmation in the panel; without it the extension answers consent-required and does nothing.

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": "qa_click"
  }
}

Input Schema

NameRequiredDescriptionDefault
refNoA ref from qa_snapshot (e.g. "e12") — preferred over selector; unique where a selector is ambiguous
nameNoClick the control with THIS accessible name — "Next", "Submit application", "Add member". Use it instead of a ref right after filling: a fill re-renders the page, which makes the ref you took before it stale (the extension refuses a stale ref rather than clicking the wrong thing). This resolves the name against a fresh snapshot, so it cannot go stale.
roleNoNarrow a `name` match to one role, e.g. "button", "link", "tab", "radio"
tabIdNoTarget tab (from qa_tabs); omit for the active tab
frameIdNoWhich frame to ask, from qa_frames. Omit for the page itself. A payment form, an SSO step or an embedded widget usually lives in a frame of its own, and a cross-origin one can only be read from inside it.
selectorNoCSS selector of the element to click

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.86.2

TDQS

A4/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full behavioral burden and does so well: pointer sequence (pointerdown → mouseup → click), scroll-into-view, refusal of unmatched or zero-size targets, return payload of what changed, `navigated`, and `announced` live-region capture. On the other hand, the gap lies in the prose salience rather than content — several critical behaviors (consent requirement, hidden-tab effect on rendering, navigation short-circuit) are buried in long parenthetical clauses and ALL-CAPS asides rather than surfaced as structured conditions.

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?

The core action and targeting modes are properly front-loaded, and most sentences carry real operational information. However, the definition is a single dense paragraph of roughly 330 words riddled with em-dash parentheticals, ALL-CAPS emphasis, and mid-sentence topic switches (diff → announced → navigated → hidden tab → consent), which forces an agent to re-parse to extract the conditional rules.

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 zero-required-parameter click tool with no output schema, this is close to complete: it explains what is returned (diff, `navigated`, `announced`, `tab`), how failure is signalled (refused stale ref, zero-size target, consent-required), and the one prerequisite of installation. The only shortfall is that the return shape is described only narratively and in inconsistent depth.

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 every one of the six parameters is already documented in the schema, including the ref-vs-name staleness rationale and frame targeting. The description restates the name-after-fill point that the `name` field already explains, and never mentions `role`, `tabId`, or `frameId`, so it adds no meaning beyond the schema. Baseline 3 applies.

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?

Names a specific verb and resource ("Click an element on the page under test") and immediately enumerates the three targeting mechanisms: qa_snapshot ref, CSS selector, or accessible name. It is unambiguously distinct from siblings like qa_click_point or qa_fill_json.

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: use `name` right after a fill because the ref goes stale, use qa_focus_tab and retry when `tab`/`state: hidden` appears, and do not press again after a navigation. It also states a hard prerequisite (one-time "Agent control" confirmation, otherwise consent-required) and covers the empty-diff interpretation trap.

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