Skip to main content
Glama

cua_find_elements

Find native Accessibility/UI Automation elements by label substring or role to get exact coordinates, ref IDs, and supported semantic actions.

Instructions

Search native Accessibility / UI Automation elements by label substring and/or role, returning exact coordinates, ref IDs, and supported semantic actions.

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

Input Schema

NameRequiredDescriptionDefault
pidNo
roleNo
queryNo
app_nameNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.2.0

TDQS

B3/5.0
Behavior2/5

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

No annotations exist, so the description carries the full burden. It usefully discloses the return contents (coordinates, ref IDs, supported semantic actions), which hints the tool is read-only and pairs with cua_element_action, but it says nothing about accessibility-permission requirements, whether the search is scoped to one app, the foreground window, or the whole desktop, or what happens when nothing matches.

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?

A single front-loaded sentence with the verb and resource first, then filters, then return shape. No filler, though 'native Accessibility / UI Automation' is jargon-heavy in a way that slightly slows parsing.

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?

With no annotations and no output schema, the description compensates partly by describing the return payload, which is genuinely valuable. But for a four-parameter tool with zero schema coverage, the silence on pid/app_name scoping and on permission or failure behavior leaves real gaps an agent would hit on first call.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so all four parameters depend on prose. The description only illuminates two of them: query as a label substring match and role as an optional companion filter ('and/or'). The pid and app_name parameters are never mentioned, and no defaults, scoping behavior, or matching semantics for them are given.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (Search) and resource (native Accessibility / UI Automation elements) plus the two filter dimensions (label substring, role) and the return payload. An agent can tell this is a targeted element lookup rather than a full tree/WM dump. It stops short of naming or contrasting with siblings like cua_ui_tree or cua_ocr.

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

Usage Guidelines3/5

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

The 'search by label substring and/or role' phrasing implies when the tool applies, but there are no explicit when-to-use vs when-not statements, no mention of prerequisites, and no routing to alternatives such as cua_ui_tree for exhaustive enumeration or cua_ocr for non-native UI. Usage is inferable, not stated.

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