Skip to main content
Glama

click

Clicks elements in a headless browser using snapshot refs or CSS selectors, returning true on success and failing for stale or missing targets.

Instructions

Click an element: a ref from snapshot or the first match of a CSS selector. Returns true; fails when nothing matches or the ref is stale.

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
targetYesA ref from the last `snapshot`, e.g. `e12`, or a CSS selector, e.g. `#price`, `form input[name=q]`.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.1.47-alpha
    • removedInput schema / properties / selector
      Removed value: -{
      -  "title": "Selector",
      -  "type": "string"
      -}
    • addedInput schema / properties / target
      Added value: +{
      +  "description": "A ref from the last `snapshot`, e.g. `e12`, or a CSS selector, e.g. `#price`, `form input[name=q]`.",
      +  "title": "Target",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "selector"
      -]New value: +[
      +  "target"
      +]
  2. First observedv0.1.46

TDQS

A4/5.0
Behavior4/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 well: it discloses the return value (`true`) and the exact failure conditions (no match, stale ref). It does not cover whether the click waits for the element, navigates, or triggers page loads, leaving a modest gap for a mutating browser action.

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?

Two short sentences, front-loaded with the verb and resource, then the return/failure behavior. No filler or repetition.

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 single-parameter tool with an output schema, the description covers target semantics and failure modes adequately. Minor omission: no mention of post-click side effects (navigation, wait) that an agent driving a browser would care about.

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 `target` description already documents both the ref format (`e12`) and CSS selector formats. The description restates the same two forms without adding syntax or precedence rules, so the baseline 3 is appropriate.

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 (click) and resource (an element), and defines the two acceptable target forms. It is clearly distinguishable from siblings like fill, snapshot, and evaluate without opening any schema.

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?

Referencing 'a ref from the last `snapshot`' implies a workflow ordering, but the description never explicitly says when to click versus using fill or evaluate, nor does it state prerequisites or exclusions. Usage is implied rather than spelled out.

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