Skip to main content
Glama
omarchy-desktop

omarchy-desktop

by martoast

Click an element by ref or by name

click_element

Clicks an interactive element using a prior ref or its accessible name/text in one call, letting agents trigger buttons, links, or controls without a separate page read.

Instructions

Click an interactive element precisely — either a ref from a previous read_page call, or by matching its accessible name/text directly (no read_page needed first; this does the find-and-click in one call, which is the efficient path for a simple 'click the X button' step). Uses the same kernel-level input as the click tool, just aimed exactly instead of guessed.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "click_element"
  }
}

Input Schema

NameRequiredDescriptionDefault
refNoA ref like 'e3' from a prior read_page call.
roleNoNarrow text search to this role, e.g. 'button', 'link'.
textNoAccessible name to search for (case-insensitive substring), if not using ref.
buttonNoleft
clicksNo
observeNofalse: skip the post-click transition watch (one quick 150 ms look); the caller confirms the result itself. Default true.
activateNotrue: press a link in the page (its own click handler) instead of opening its href. Default false.
window_addressNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations at all, the description carries the full burden. It usefully discloses that this emits real kernel-level input events and that the click is aimed rather than guessed, but it omits important behavior: what happens on zero or multiple name matches, whether the click can navigate away or trigger side effects, and what the call reports back on success or failure.

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 sentences, front-loaded with the core action and the two targeting modes before the efficiency rationale and the sibling comparison. Minor waste in persuasive phrasing ("the efficient path", "just aimed exactly instead of guessed"), but nothing is padded or redundant.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 8-parameter, zero-annotation, no-output-schema action tool, the description covers the targeting model and the one-call workflow but not result reporting, ambiguity resolution, or failure modes. The observe parameter hints at post-click transition watching, yet the description never says what a successful click returns.

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?

Description adds the semantic relation that ref and name-based lookup are alternative targeting modes (ref wins/one or the other), which is not expressed in the schema. Beyond that it largely repeats schema text ("ref from a previous read_page call", "accessible name"), leaving role, button, clicks, observe, activate, and window_address to their own schema descriptions at 63% coverage.

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 and resource ("Click an interactive element") and defines two distinct targeting modes: a ref from read_page, or a direct accessible-name/text match. It also explicitly positions itself against the sibling "click" tool ("same kernel-level input as the click tool, just aimed exactly instead of guessed"), so an agent can distinguish them without opening schemas.

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

Usage Guidelines4/5

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

Gives clear when-to-use guidance: prefer this for a simple "click the X button" step because it does find-and-click in one call with no prior read_page. It contrasts with the generic click tool but does not state when the ref path is preferable over the text path, nor any exclusions such as ambiguous matches.

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