Skip to main content
Glama

Smart click (UIA-first)

sandbox_smart_click

Clicks a UI control by name or automation ID using an accessibility-first strategy ladder, activating buttons, menu items, and web content that ignore synthesized mouse input, then verifies the effect.

Instructions

Click a control by selector using the UIA-first strategy ladder: Invoke/Toggle/Select/ExpandCollapse pattern, then the legacy IAccessible default action, then UIA focus + Enter (activates web content that ignores synthesized mouse input), then a focus-verified SendInput click at the element. Reports every attempt, the winning strategy and an effect check (element gone / state changed). Prefer this over pixel sandbox_click; querying the element also wakes Chromium accessibility, which makes web pages drivable.

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": "sandbox_smart_click"
  }
}

Input Schema

NameRequiredDescriptionDefault
pidNoProcess whose windows to search (from sandbox_launch).
nameNoElement name (visible label), exact match; falls back to contains.
indexNoWhich match to use when several match (default 0).
verifyNoEffect check: auto (default) = gone or state changed; gone = element must disappear; state = state must change; none = trust the pattern.
timeoutSecNoDefault 15.
controlTypeNoButton, Edit, CheckBox, ComboBox, ListItem, MenuItem, TabItem, Text, ...
windowTitleNoOr: a window whose title contains this text.
automationIdNoAutomationId (control name in WinForms/WPF), exact match.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0-alpha.3

TDQS

A4.1/5.0
Behavior4/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 well: it enumerates the ordered fallback ladder, discloses the side effect of waking Chromium accessibility, and says the result includes every attempt, the winning strategy, and an effect check. It does not describe failure/timeout behavior or what an exhausted ladder returns, which is the main residual gap for a mutation 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?

Dense but front-loaded: the tool's mechanism comes first, then the output contract, then the sibling comparison. Four sentences with no filler, though the parenthetical about Chromium could be tightened.

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 an 8-parameter, no-annotation, no-output-schema tool, the description supplies the return contract (attempts, winning strategy, effect check) that would otherwise be missing. The ordered ladder makes the fallback semantics predictable, leaving only error/timeout reporting unstated.

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 each parameter (pid, name, controlType, automationId, verify, timeoutSec) already has a clear inline description. The description's mention of an "effect check (element gone / state changed)" maps to verify but only restates what the enum already documents, adding no syntax or precedence detail beyond the schema.

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 control by selector") and immediately distinguishes itself from the sibling by naming "pixel sandbox_click" as the alternative. The strategy ladder further pins down the mechanism so an agent knows exactly what class of operation this is.

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?

Explicitly says "Prefer this over pixel sandbox_click" and gives the reason (querying the element wakes Chromium accessibility), which is a real selection rule rather than vague framing. It stops short of stating when the agent should fall back to pixel click (e.g. non-UIA/owner-drawn targets where all ladder rungs fail).

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