Skip to main content
Glama

click

Activate web elements by role and accessible name, or by visible text. Returns match count along with any dialogs, new tabs, or JS errors, and navigates back after external links.

Instructions

Click an element the way a person would. Find it by role and accessible name, such as role button and name Save, or by its visible text when it has no useful role. When nothing matches the role and name, the name is tried as visible text. Returns what was clicked, how many elements matched, and any dialogs, new tabs or JavaScript errors that followed. When a click leads to another site, the browser goes back and says so.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nthNoWhich match to click when several elements match, counting from 0. Defaults to 0, the first one.
nameNoAccessible name of the element, as the snapshot shows it, such as Save or Create automation. Without role, it is matched as visible text.
roleNoARIA role of the element, such as button, link, tab, checkbox, menuitem or textbox, as the snapshot shows it. Use it together with name.
textNoVisible text to click when the element has no useful role, such as the title of a card. Ignored when role is given.
exactNoMatch the name or the text exactly, including case. Defaults to false, which also matches part of the text.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.4.6
    • addedInput schema / properties / exact / description
      Added value: +"Match the name or the text exactly, including case. Defaults to false, which also matches part of the text."
    • addedInput schema / properties / name / description
      Added value: +"Accessible name of the element, as the snapshot shows it, such as Save or Create automation. Without role, it is matched as visible text."
    • addedInput schema / properties / nth / description
      Added value: +"Which match to click when several elements match, counting from 0. Defaults to 0, the first one."
    • addedInput schema / properties / role / description
      Added value: +"ARIA role of the element, such as button, link, tab, checkbox, menuitem or textbox, as the snapshot shows it. Use it together with name."
    • addedInput schema / properties / text / description
      Added value: +"Visible text to click when the element has no useful role, such as the title of a card. Ignored when role is given."
  2. First observedv0.4.5

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It reveals fallback matching, return contents ('what was clicked, how many elements matched, and any dialogs, new tabs or JavaScript errors'), and the browser going back after cross-site navigation. This is unusually transparent, though it does not mention all possible side effects like form submission or state changes.

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?

The description is compact and well-structured. Every sentence earns its place: core action, targeting strategy, fallback behavior, return information, and navigation side effect. There is no redundant or filler content.

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 tool with five optional parameters, no output schema, and no annotations, the description covers targeting, fallback, return values, and navigation side effects. It could go further on when to use this versus sibling tools or what happens during page load, but the essential calling context is present.

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?

The input schema already documents all five parameters in detail, so the baseline is 3. The description adds meaningful semantics beyond the schema by explaining the role+name pairing, the visible-text fallback, and what happens when no role/name match occurs, which helps an agent use the parameters correctly.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the action and resource clearly: 'Click an element the way a person would.' It also specifies targeting strategies via role/accessible name or visible text, which is specific enough to understand what the tool does. It does not explicitly compare itself to siblings like press, check, or select, but the element-focused wording is distinct.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The intended use is implied: click an element by role/name or visible text, with a fallback when role/name fails. However, there is no explicit guidance about when to prefer this tool over siblings like check, select, or press, nor are there exclusions or when-not-to-use conditions.

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