Skip to main content
Glama

Click

click
Destructive

Press an element by its element_id or screen coordinates to trigger real actions in the target app; the accessibility press action works even when the element is scrolled out of view.

Instructions

Click an element by element_id (preferred: it uses the accessibility press action, so it works even when the element is scrolled out of view) or at absolute screen coordinates taken from a screenshot or zoom. Pass element_id or x and y, not both. Use browser_click for pages in the agent's Chrome tabs, right_click for context menus, and drag for press-move-release. The click reaches the target app for real and can trigger any action the user could, so read the target with get_app_state first. The agent's own pointer overlay moves to the target. On macOS the user's mouse pointer never moves; on Windows and Linux a target that ignores background input gets real mouse input, which moves the user's pointer, and the result then says via cursor.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xNoScreen x coordinate in points, used together with y when no element_id is given
yNoScreen y coordinate in points, used together with x when no element_id is given
element_idNoElement id from the most recent get_app_state snapshot, e.g. e12. Preferred over coordinates.
click_countNo1 for a single click (default), 2 for a double-click
state_queryNoWith return_state, list only elements whose role, label or value contains this text, like get_app_state's query
return_stateNoAfter acting, wait briefly for the UI to settle and append a fresh get_app_state of the app you last read, so you can check the result and pick the next target in the same call. Its ids replace every earlier id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.5.2
    • addedInput schema / properties / return_state
      Added value: +{
      +  "description": "After acting, wait briefly for the UI to settle and append a fresh get_app_state of the app you last read, so you can check the result and pick the next target in the same call. Its ids replace every earlier id.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / state_query
      Added value: +{
      +  "description": "With return_state, list only elements whose role, label or value contains this text, like get_app_state's query",
      +  "type": "string"
      +}
  2. Changed4 schema fields changedv0.3.1
    • changedInput schema / properties / click_count / description
      Previous value: -"1 for single, 2 for double-click"New value: +"1 for a single click (default), 2 for a double-click"
    • changedInput schema / properties / element_id / description
      Previous value: -"Element id from get_app_state, e.g. e12"New value: +"Element id from the most recent get_app_state snapshot, e.g. e12. Preferred over coordinates."
    • addedInput schema / properties / x / description
      Added value: +"Screen x coordinate in points, used together with y when no element_id is given"
    • addedInput schema / properties / y / description
      Added value: +"Screen y coordinate in points, used together with x when no element_id is given"
  3. First observedv0.3.0

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations: it explains that the click reaches the real app and can trigger any user-level action, that element_id uses the accessibility press action and works off-screen, that the agent's overlay moves to the target, and the platform-specific pointer side effects (macOS never moves the user's pointer; Windows/Linux may, signalled by 'via cursor' in the result). This is exactly the extra context annotations like destructiveHint cannot convey.

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-loads the core action and targeting modes, then folds routing, prerequisites, and platform caveats into a few dense sentences. Slightly long, but nearly every clause carries operational information; a minor tightening could help.

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 a 6-param, zero-required, destructive, annotation-covered tool with no output schema, the description covers targeting, prerequisites, exclusions, side effects, and even the shape of the result ('the result then says via cursor'). Nothing an agent needs to invoke it safely is missing.

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?

Schema coverage is already 100%, but the description still adds value: it states element_id is preferred and that element_id and x/y are mutually exclusive (0 required params means the schema does not enforce this). It does not explain click_count or state_query/return_state beyond what the schema says, so it stops short of a 5.

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+resource ('Click an element') and immediately names the two accepted targeting modes (element_id vs x/y). It also explicitly differentiates itself from siblings (browser_click, right_click, drag), so an agent can route correctly without reading other schemas.

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 when-to-use routing ('Use browser_click for pages in the agent's Chrome tabs, right_click for context menus, drag for press-move-release'), a prerequisite ('read the target with get_app_state first'), and a parameter-level rule ('Pass element_id or x and y, not both').

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