Skip to main content
Glama

click

Simulate real mouse press/release on Java Swing components to activate menu items, table cells, lists and tree nodes, waiting until usable and returning an updated UI snapshot.

Instructions

Click a component like a user would, with real mouse press/release events: a focusable component takes the focus first (so the previous field's input verifier and focus-lost handlers run). Menu items, even inside closed menus, are activated directly. For tables, lists and trees pass value (the cell's text, the item's text, or a tree path like "Root/Child") or row (and col for tables). Use clickCount=2 for double-click, button=right for context menus, modifiers="Ctrl" or "Shift" to add to or extend the selection (select_option with values/indexes does several at once). Waits first (up to timeoutMs) until the component is visible, enabled, editable where needed, and not blocked by a modal dialog or busy overlay, so no wait_for is needed for a component that is about to become usable. Returns the new snapshot.

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

Input Schema

NameRequiredDescriptionDefault
xNoExplicit x inside the component
yNoExplicit y inside the component
colNoTable column
refYes
rowNoRow (table/tree) or index (list) to click
valueNoTable: text of a cell to click (first match; limit with col). List: item text. Tree: node path, ancestors get expanded
buttonNo
dialogNoAnswer the modal dialog this action opens with this button (text, or ok/yes/no/cancel); its message is reported. An error if no dialog opens within 3 s
headerNoTable: click the header of column col (e.g. to sort)
modifiersNoKeys held during the click: Ctrl, Shift, Alt, Meta, or combined like Ctrl+Shift
timeoutMsNoHow long to wait for the component to become usable (default 10000)
clickCountNo2 for double-click

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does: it discloses side effects (focus transfer triggers the previous field's input verifier and focus-lost handlers), special-case behavior (closed-menu items activate directly; tree ancestors expand), and a blocking pre-condition (waits up to timeoutMs for visible/enabled/editable and not blocked by modal or busy overlay). It also states the return value and the dialog-answering error condition, which is unusually complete for an unannotated tool.

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?

The most decision-relevant facts — real mouse events, focus behavior, and the wait-before-acting guarantee — are front-loaded, and nearly every clause carries operational information. It is a dense single block however, packing click-variants, widget targeting, and waiting into one paragraph without sub-structure, making it slightly harder to scan.

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 12-parameter, unannotated interaction tool with no output schema, the definition covers everything an agent needs to call it safely: the waiting guarantee, focus side effects, special-case activation, return value ('the new snapshot'), and dialog handling. No material behavior is left to inference.

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 83%, so the schema already documents most fields; the description nevertheless adds targeting intent rather than restating types, explaining that value/row/col select per-widget (cell text, item text, tree path) and that modifiers combine to add or extend a selection. It stops short of covering x/y/header/timeoutMs semantics, which the schema handles, so it is additive but not exhaustive.

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?

The opening clause gives a specific verb (click) plus the mechanism ('real mouse press/release events'), which distinguishes it from keyboard-driven siblings like press_key or type_text. It also carves out niche behaviors (menu items in closed menus, table/list/tree targeting) so an agent knows exactly which surface this tool covers.

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?

It explicitly removes the need for a sibling call ('so no wait_for is needed') and routes multi-selection to an alternative ('select_option with values/indexes does several at once'). Those are concrete when-to-use and when-to-use-something-else statements rather than implied guidance.

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