Skip to main content
Glama

Click a button by name

amiga_ui_click

Clicks a gadget by its label with the real mouse, bringing its window to the front when needed, and reports which gadget and window were clicked.

Instructions

Click a gadget found by its label (as amiga_ui_list shows it) with the real mouse, bringing its window to the front first if needed. 'close', 'depth', 'zoom' and 'size' name a window's border gadgets. If several gadgets match, narrow it with window, kind or nth, or use the gadget's id. Returns which gadget was clicked, in which window; fails if none matches. A click can make the program do anything that button does (Quit, Delete, ...).

Input Schema

NameRequiredDescriptionDefault
idNothe gadget's id from amiga_ui_list (GadgetID); stays right when the layout moves
nthNowhich of several matches, from 1
kindNobutton, string, toggle, cycle, custom, ...
nameNothe gadget's label
doubleNodouble-click
windowNopart of the window title

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.1
    • changedInput schema / properties / kind / description
      Previous value: -"button, string, toggle, custom, ..."New value: +"button, string, toggle, cycle, custom, ..."
  2. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare non-readOnly, non-idempotent, non-destructive, but the description adds the traits that matter: the window is brought to the front as a side effect, the click is a real mouse event, and the program may then do anything the gadget does (Quit, Delete). That last warning meaningfully tempers the destructiveHint=false signal without contradicting it, and the failure case is disclosed.

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?

The core action and its prerequisite are front-loaded, then disambiguation, then return/failure behavior, then the risk note. No sentence is filler and the ordering matches how an agent would need the information.

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?

With no output schema, the description still states what is returned (which gadget, in which window) and the failure mode. For a 6-optional-parameter interaction tool with full schema coverage and annotations, nothing an agent needs in order to call it correctly 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 100%, so the baseline is 3, but the description adds genuine selection semantics by explaining how id, nth, kind and window combine to disambiguate multiple matches and by explaining what the special border-gadget names mean. It stays silent on the effect of 'double', which the schema already labels.

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 a gadget found by its label') and anchors it to the sibling that enumerates those labels (amiga_ui_list), which separates it from amiga_pointer, amiga_mouse and amiga_ui_set. The note that 'close', 'depth', 'zoom' and 'size' name border gadgets extends the concept precisely.

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 operating context: labels come from amiga_ui_list, window is raised first, and ambiguity is resolved with window, kind, nth, or the gadget id. It does not explicitly say when to prefer raw amiga_pointer/amiga_mouse instead, so the alternative routing is only implied.

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