Skip to main content
Glama

find_elements

Locate interactive UI elements by role or exact name within a window and return handles for clicking or typing. Use it to find buttons, menus, and fields before acting on them.

Instructions

Find interactive elements by role and/or name. Returns element handles — pass the 'id' field to click/type_text/etc. Common roles: button, combo box, text, entry, check box, menu item. name is an exact match, not a substring ("Load Listfile…" with its ellipsis, "Export Folder" not "Export"); use get_tree to read names.

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": {
      "window_id": "<window_id>"
    },
    "name": "find_elements"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNo
roleNo
window_idYes

Output Schema

NameRequiredDescriptionDefault
resultYes

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, the description carries the full burden but discloses only the return contract and the exact-match caveat. It says nothing about scope (single window vs. all), permissions, failure behavior when nothing matches, or whether results are ordered/bounded.

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?

Front-loaded with purpose and return value, then caveats. Every sentence carries information; only the parenthetical examples are slightly verbose, and the trailing get_tree pointer could be tighter.

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?

An output schema exists, so return values needn't be fully spelled out, and the exact-match trap is well covered. However, for a required window_id and a lookup tool with no annotations, the absence of any statement about matching scope, no-result behavior, or window_id semantics leaves a real gap.

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 description coverage is 0%, so the description must carry parameter meaning, and it does for two of three: name is an exact match (with concrete ellipsis example) and role accepts a listed enumeration. The required window_id parameter is never explained at all.

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 ('Find interactive elements by role and/or name') and immediately clarifies the output contract ('ElementHandle — pass the id field to click/type_text'). The contrast with get_tree for reading names makes it distinguishable from siblings without opening their 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?

Explicitly routes the agent to get_tree when it needs to read names, and implies this tool is for locating known elements before acting. It does not state a when-not-to-use condition beyond that one alternative, so it stops short of a 5.

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