Skip to main content
Glama

click

Activate a page element by targeting its @eN ref, visible text, @text/@label/@role accessor, or CSS selector; errors identify overlays or disabled targets and can auto-dismiss consent banners.

Instructions

Click an element. Target: an @eN ref from map_compact, visible text (Add to cart), @text: / @label: / @role:button[name=Pay], or a CSS selector. If the page covers or disables the target the error says what is in the way.

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

Input Schema

NameRequiredDescriptionDefault
indexNoAct on the Nth match (0-based, document order) when the target matches several elements.
leaseNoOptional lease token to present if the target session is leased (0.7.0). Threaded per-call; never read from the server's env.
targetYes@eN ref, visible text, @text:/@label:/@role:, or CSS.
sessionNoOptional session name to target (omit for the shared 'default'). On a daemon shared with other agents, pass a UNIQUE name for stateful multi-step work (go→click→fill) so you don't collide on 'default'.
timeout_msNoTimeout in ms.
auto_dismiss_bannersNoOn 'intercepted' failure, dismiss cookie/consent banners once and retry.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.21.0
    • changedInput schema / properties / auto_dismiss_banners / description
      Previous value: -"On 'intercepted' failure, try dismiss_banners once and retry."New value: +"On 'intercepted' failure, dismiss cookie/consent banners once and retry."
    • changedInput schema / properties / index / description
      Previous value: -"Act on the Nth match (0-based, from `candidates`) when the target is ambiguous."New value: +"Act on the Nth match (0-based, document order) when the target matches several elements."
    • changedInput schema / properties / target / description
      Previous value: -"@eN ref or selector."New value: +"@eN ref, visible text, @text:/@label:/@role:, or CSS."
  2. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/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 disclose one real behavioral trait: on occlusion or disabled targets the error reports what is in the way, and auto_dismiss_banners is tied to the 'intercepted' failure. It does not state that a click is a state-mutating page interaction, whether it waits for navigation/network after the click, or what is returned on success.

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?

Three tight sentences, front-loaded with the action, then the target grammar, then failure behavior. No filler; the only mild density cost is the packed slash-separated selector syntax, which is still readable.

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 6-parameter action tool with rich schema descriptions and no output schema, the definition covers the hard part an agent needs: how to express a target and what an 'intercepted' failure means. The remaining gaps are behavioral (post-click waiting, whether the call is stateful across the session) rather than syntactic.

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 the baseline is 3. The description does add a little meaning to `target` by showing concrete syntax examples (`Add to cart`, @role:button[name=Pay]) and naming map_compact as the origin of @eN refs, but it says nothing about index, session, lease, or timeout beyond what the schema already covers.

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?

Opens with a specific verb and resource ("Click an element") and immediately enumerates the accepted target forms, which makes it distinguishable from fill, hover, press, dblclick and vision_click by capability. It stops short of naming those siblings, so the differentiation is inferred rather than stated.

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?

Usage is implied through the target grammar and the pointer to map_compact as the source of @eN refs, which is genuinely helpful routing. There is no explicit when-to-use/when-not guidance, e.g. when to prefer vision_click (unresolvable targets), dblclick, or press instead.

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